diff --git a/Core/Src/freertos.c b/Core/Src/freertos.c
index 071061e..127eba4 100644
--- a/Core/Src/freertos.c
+++ b/Core/Src/freertos.c
@@ -191,25 +191,30 @@ void start_tcp_task(void const *argument)
if (tcp_echo_flags_hart1 == 1)
{
tcp_abort(server_pcb_hart1); // 热插拔下线时调用
+ tcp_echo_flags_hart1 = 0;
}
if (tcp_echo_flags_hart2 == 1)
{
tcp_abort(server_pcb_hart2); // 热插拔下线时调用
+ tcp_echo_flags_hart2 = 0;
}
#if (BLE2_USART6 == 1)
if (tcp_echo_flags_ble1 == 1)
{
tcp_abort(server_pcb_ble1); // 热插拔下线时调用
+ tcp_echo_flags_ble1 = 0;
}
#endif
if (tcp_echo_flags_ble2 == 1)
{
tcp_abort(server_pcb_ble2); // 热插拔下线时调用
+ tcp_echo_flags_ble2 = 0;
}
if (tcp_echo_flags_control == 1)
{
tcp_abort(server_pcb_control); // 热插拔下线时调用
+ tcp_echo_flags_control = 0;
}
tcp_echo_flags_ble1 = 2;
}
diff --git a/LWIP/App/lwip.c b/LWIP/App/lwip.c
index ccddfa5..522991c 100644
--- a/LWIP/App/lwip.c
+++ b/LWIP/App/lwip.c
@@ -22,7 +22,7 @@
#include "lwip.h"
#include "lwip/init.h"
#include "lwip/netif.h"
-#if defined ( __CC_ARM ) /* MDK ARM Compiler */
+#if defined(__CC_ARM) /* MDK ARM Compiler */
#include "lwip/sio.h"
#endif /* MDK ARM Compiler */
#include "ethernetif.h"
@@ -53,8 +53,8 @@ uint8_t GATEWAY_ADDRESS[4];
/* USER CODE END 2 */
/**
- * LwIP initialization function
- */
+ * LwIP initialization function
+ */
void MX_LWIP_Init(void)
{
/* IP addresses initialization */
@@ -71,15 +71,15 @@ void MX_LWIP_Init(void)
GATEWAY_ADDRESS[2] = 1;
GATEWAY_ADDRESS[3] = 29;
-/* USER CODE BEGIN IP_ADDRESSES */
-/* USER CODE END IP_ADDRESSES */
+ /* USER CODE BEGIN IP_ADDRESSES */
+ /* USER CODE END IP_ADDRESSES */
/* Initilialize the LwIP stack with RTOS */
- tcpip_init( NULL, NULL );
+ tcpip_init(NULL, NULL);
/* IP addresses initialization without DHCP (IPv4) */
IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]);
- IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1] , NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]);
+ IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1], NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]);
IP4_ADDR(&gw, GATEWAY_ADDRESS[0], GATEWAY_ADDRESS[1], GATEWAY_ADDRESS[2], GATEWAY_ADDRESS[3]);
/* add the network interface (IPv4/IPv6) with RTOS */
@@ -103,19 +103,19 @@ void MX_LWIP_Init(void)
netif_set_link_callback(&gnetif, ethernet_link_status_updated);
/* Create the Ethernet link handler thread */
-/* USER CODE BEGIN H7_OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
+ /* USER CODE BEGIN H7_OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
osThreadDef(EthLink, ethernet_link_thread, osPriorityBelowNormal, 0, configMINIMAL_STACK_SIZE * 2);
osThreadCreate(osThread(EthLink), &gnetif);
-/* USER CODE END H7_OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
+ /* USER CODE END H7_OS_THREAD_DEF_CREATE_CMSIS_RTOS_V1 */
-/* USER CODE BEGIN 3 */
+ /* USER CODE BEGIN 3 */
flash_read_data(FLASH_USER_START_ADDR, IP_ADDRESS, 4);
if (IP_ADDRESS[0] == 192)
{
IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]);
gnetif.ip_addr = ipaddr;
}
-/* USER CODE END 3 */
+ /* USER CODE END 3 */
}
#ifdef USE_OBSOLETE_USER_CODE_SECTION_4
@@ -126,25 +126,25 @@ void MX_LWIP_Init(void)
#endif
/**
- * @brief Notify the User about the network interface config status
- * @param netif: the network interface
- * @retval None
- */
+ * @brief Notify the User about the network interface config status
+ * @param netif: the network interface
+ * @retval None
+ */
static void ethernet_link_status_updated(struct netif *netif)
{
if (netif_is_up(netif))
{
-/* USER CODE BEGIN 5 */
-/* USER CODE END 5 */
+ /* USER CODE BEGIN 5 */
+ /* USER CODE END 5 */
}
else /* netif is down */
{
-/* USER CODE BEGIN 6 */
-/* USER CODE END 6 */
+ /* USER CODE BEGIN 6 */
+ /* USER CODE END 6 */
}
}
-#if defined ( __CC_ARM ) /* MDK ARM Compiler */
+#if defined(__CC_ARM) /* MDK ARM Compiler */
/**
* Opens a serial device for communication.
*
@@ -155,9 +155,9 @@ sio_fd_t sio_open(u8_t devnum)
{
sio_fd_t sd;
-/* USER CODE BEGIN 7 */
+ /* USER CODE BEGIN 7 */
sd = 0; // dummy code
-/* USER CODE END 7 */
+ /* USER CODE END 7 */
return sd;
}
@@ -172,8 +172,8 @@ sio_fd_t sio_open(u8_t devnum)
*/
void sio_send(u8_t c, sio_fd_t fd)
{
-/* USER CODE BEGIN 8 */
-/* USER CODE END 8 */
+ /* USER CODE BEGIN 8 */
+ /* USER CODE END 8 */
}
/**
@@ -191,9 +191,9 @@ u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len)
{
u32_t recved_bytes;
-/* USER CODE BEGIN 9 */
+ /* USER CODE BEGIN 9 */
recved_bytes = 0; // dummy code
-/* USER CODE END 9 */
+ /* USER CODE END 9 */
return recved_bytes;
}
@@ -210,10 +210,9 @@ u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len)
{
u32_t recved_bytes;
-/* USER CODE BEGIN 10 */
+ /* USER CODE BEGIN 10 */
recved_bytes = 0; // dummy code
-/* USER CODE END 10 */
+ /* USER CODE END 10 */
return recved_bytes;
}
#endif /* MDK ARM Compiler */
-
diff --git a/MDK-ARM/semi-finished_product_testing.uvoptx b/MDK-ARM/semi-finished_product_testing.uvoptx
index 962f6bc..ed0a515 100644
--- a/MDK-ARM/semi-finished_product_testing.uvoptx
+++ b/MDK-ARM/semi-finished_product_testing.uvoptx
@@ -170,6 +170,11 @@
1
phyreg
+
+ 4
+ 1
+ lwip_taskHandle,0x0A
+
diff --git a/MDK-ARM/semi-finished_product_testing/semi-finished_product_testing.build_log.htm b/MDK-ARM/semi-finished_product_testing/semi-finished_product_testing.build_log.htm
index 7739d1e..aed9b3c 100644
--- a/MDK-ARM/semi-finished_product_testing/semi-finished_product_testing.build_log.htm
+++ b/MDK-ARM/semi-finished_product_testing/semi-finished_product_testing.build_log.htm
@@ -27,6 +27,147 @@ Project File Date: 03/31/2025
Output:
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'semi-finished_product_testing'
+assembling startup_stm32f407xx.s...
+compiling lan8742.c...
+compiling gpio.c...
+compiling dma.c...
+compiling tim.c...
+compiling stm32f4xx_hal_msp.c...
+compiling stm32f4xx_hal_timebase_tim.c...
+compiling usart.c...
+compiling main.c...
+compiling lwip.c...
+compiling ethernetif.c...
+compiling stm32f4xx_hal_rcc.c...
+compiling freertos.c...
+compiling spi.c...
+compiling stm32f4xx_it.c...
+compiling stm32f4xx_hal_rcc_ex.c...
+compiling stm32f4xx_hal_flash.c...
+compiling stm32f4xx_hal_flash_ex.c...
+compiling stm32f4xx_hal_flash_ramfunc.c...
+compiling stm32f4xx_hal_gpio.c...
+compiling stm32f4xx_hal_dma_ex.c...
+compiling stm32f4xx_hal_dma.c...
+compiling stm32f4xx_hal_pwr_ex.c...
+compiling stm32f4xx_hal_pwr.c...
+compiling stm32f4xx_hal_cortex.c...
+compiling stm32f4xx_hal_exti.c...
+compiling stm32f4xx_hal_eth.c...
+compiling stm32f4xx_hal.c...
+compiling stm32f4xx_hal_spi.c...
+compiling croutine.c...
+compiling stm32f4xx_hal_tim_ex.c...
+compiling stm32f4xx_hal_tim.c...
+compiling event_groups.c...
+compiling stream_buffer.c...
+compiling list.c...
+compiling stm32f4xx_hal_uart.c...
+compiling timers.c...
+compiling heap_4.c...
+compiling tasks.c...
+compiling queue.c...
+compiling system_stm32f4xx.c...
+compiling cmsis_os.c...
+compiling port.c...
+compiling ccp.c...
+compiling auth.c...
+compiling chap_ms.c...
+compiling chap-md5.c...
+compiling demand.c...
+compiling chap-new.c...
+compiling eui64.c...
+compiling fsm.c...
+compiling eap.c...
+compiling ipcp.c...
+compiling ipv6cp.c...
+compiling lcp.c...
+compiling magic.c...
+compiling multilink.c...
+compiling mppe.c...
+compiling ppp.c...
+compiling pppapi.c...
+compiling pppoe.c...
+compiling pppcrypt.c...
+compiling pppol2tp.c...
+compiling pppos.c...
+compiling upap.c...
+compiling utils.c...
+compiling vj.c...
+compiling bridgeif.c...
+compiling bridgeif_fdb.c...
+compiling ethernet.c...
+compiling lowpan6.c...
+compiling lowpan6_ble.c...
+compiling lowpan6_common.c...
+compiling zepif.c...
+compiling slipif.c...
+compiling ecp.c...
+compiling if_api.c...
+compiling netdb.c...
+compiling err.c...
+compiling netbuf.c...
+compiling api_msg.c...
+compiling api_lib.c...
+compiling netifapi.c...
+compiling tcpip.c...
+compiling altcp.c...
+compiling sockets.c...
+compiling altcp_tcp.c...
+compiling altcp_alloc.c...
+compiling def.c...
+compiling dns.c...
+compiling mem.c...
+compiling ip.c...
+compiling inet_chksum.c...
+compiling init.c...
+compiling memp.c...
+compiling raw.c...
+compiling netif.c...
+compiling stats.c...
+compiling pbuf.c...
+compiling sys.c...
+compiling tcp.c...
+compiling tcp_in.c...
+compiling tcp_out.c...
+compiling timeouts.c...
+compiling udp.c...
+compiling autoip.c...
+compiling etharp.c...
+compiling igmp.c...
+compiling icmp.c...
+compiling dhcp.c...
+compiling ip4.c...
+compiling ip4_addr.c...
+compiling ip4_frag.c...
+compiling dhcp6.c...
+compiling ethip6.c...
+compiling icmp6.c...
+compiling ble_mx_02.c...
+compiling inet6.c...
+compiling ip6.c...
+compiling ip6_addr.c...
+compiling ip6_frag.c...
+compiling mld6.c...
+compiling user_lib.c...
+compiling nd6.c...
+compiling sys_arch.c...
+compiling leds.c...
+compiling linear_encoder.c...
+compiling communication_protocol.c...
+compiling mqtt.c...
+compiling tcpclient.c...
+compiling tcpserverc.c...
+compiling ad7124.c...
+compiling dac161s997.c...
+compiling ht1200m.c...
+compiling user_gpio.c...
+compiling user_spi.c...
+compiling user_flash.c...
+compiling uart_lcd.c...
+linking...
+Program Size: Code=93900 RO-data=1472 RW-data=1640 ZI-data=62880
+FromELF: creating hex file...
"semi-finished_product_testing\semi-finished_product_testing.axf" - 0 Error(s), 0 Warning(s).
Software Packages used:
@@ -51,7 +192,7 @@ Package Vendor: Keil
* Component: ARM::CMSIS:CORE:5.5.0
Include file: CMSIS\Core\Include\tz_context.h
-Build Time Elapsed: 00:00:00
+Build Time Elapsed: 00:00:09