diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 26f48142f0534ddece868e4ab670da3ef98ab80e..3bd315b7256f76814c24aadb49d0aec7ceb28fb7 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -1,3 +1,15 @@ +# Phytium FreeRTOS SDK 2022-10-21 ChangeLog + +Change Log sinc 2022-10-15 + +## example + +- add e2000q example +## third-party + +- Adapt fatfs to e2000 demo board for sata +- Add the lwip configuration kconfig +- Add udp multicast function # Phytium FreeRTOS SDK 2022-10-10 ChangeLog diff --git a/drivers/eth/xmac/ft_os_xmac.c b/drivers/eth/xmac/ft_os_xmac.c index 2ce3e8d0e817318adde99251c959fa32af2d0360..482870f91e91d4ff7864ef910ca49d06b35d48a4 100644 --- a/drivers/eth/xmac/ft_os_xmac.c +++ b/drivers/eth/xmac/ft_os_xmac.c @@ -54,25 +54,26 @@ static void FXmacInitOnError(FXmacOs *instance_p); static void FXmacSetupIsr(FXmacOs *instance_p); -extern void sys_sem_signal_fromisr(sys_sem_t *sem); +extern void sys_sem_signal(sys_sem_t *sem); static FXmacOs fxmac_os_instace[FT_XMAC_NUM] = { [FT_XMAC0_ID] = { - .config =(FXMAC_OS_CONFIG_COPY_ALL_FRAMES | FXMAC_OS_CONFIG_CLOSE_FCS_CHECK) + .config =( 0) }, [FT_XMAC1_ID] = { - .config =(FXMAC_OS_CONFIG_COPY_ALL_FRAMES | FXMAC_OS_CONFIG_CLOSE_FCS_CHECK) + .config =( 0) }, [FT_XMAC2_ID] = { - .config =(FXMAC_OS_CONFIG_COPY_ALL_FRAMES | FXMAC_OS_CONFIG_CLOSE_FCS_CHECK) + .config =( 0) }, [FT_XMAC3_ID] = { - .config =(FXMAC_OS_CONFIG_COPY_ALL_FRAMES | FXMAC_OS_CONFIG_CLOSE_FCS_CHECK ) + .config =( 0 ) }, }; -/* queue */ +int isr_calling_flg = 0; +/* queue */ void FXmacQueueInit(PqQueue *q) { @@ -328,7 +329,6 @@ void SetupRxBds(FXmacOs *instance_p, FXmacBdRing *rxring) u32 freebds; u32 bdindex; u32 *temp; - freebds = FXMAC_BD_RING_GET_FREE_CNT(rxring); while (freebds > 0) { @@ -340,8 +340,8 @@ void SetupRxBds(FXmacOs *instance_p, FXmacBdRing *rxring) } else { - p = pbuf_alloc(PBUF_RAW, FXMAC_MAX_FRAME_SIZE, PBUF_POOL); - } + p = pbuf_alloc(PBUF_RAW, FXMAC_MAX_FRAME_SIZE, PBUF_POOL); + } if (!p) { @@ -448,7 +448,7 @@ void FXmacRecvHandler(void *arg) /* * Adjust the buffer size to the actual number of bytes received. */ - if(instance_p->config & FXMAC_OS_CONFIG_JUMBO) + if(instance_p->config & FXMAC_OS_CONFIG_JUMBO) { rx_bytes = FXMAC_GET_RX_FRAME_SIZE(&(instance_p->instance), curbdptr); } @@ -456,7 +456,6 @@ void FXmacRecvHandler(void *arg) { rx_bytes = FXMAC_BD_GET_LENGTH(curbdptr); } - pbuf_realloc(p, rx_bytes); /* Invalidate RX frame before queuing to handle @@ -481,9 +480,8 @@ void FXmacRecvHandler(void *arg) /* free up the BD's */ FXmacBdRingFree(rxring, bd_processed, rxbdset); SetupRxBds(instance_p, rxring); - #if !NO_SYS - sys_sem_signal_fromisr(&xmac_netif_p->sem_rx_data_available); + sys_sem_signal(&xmac_netif_p->sem_rx_data_available); #endif } @@ -583,7 +581,8 @@ FError FXmacInitDma(FXmacOs *instance_p) /* * Allocate RX descriptors, 1 RxBD at a time. */ - for (i = 0; i < FXMAX_RX_PBUFS_LENGTH; i++) + printf("Allocate RX descriptors, 1 RxBD at a time. \r\n"); + for (i = 0; i < FXMAX_RX_PBUFS_LENGTH; i++) { if(instance_p->config & FXMAC_OS_CONFIG_JUMBO) { @@ -600,13 +599,13 @@ FError FXmacInitDma(FXmacOs *instance_p) lwip_stats.link.memerr++; lwip_stats.link.drop++; #endif - FXMAC_OS_XMAC_PRINT_I("unable to alloc pbuf in InitDma\r\n"); + FXMAC_OS_XMAC_PRINT_E("unable to alloc pbuf in InitDma\r\n"); return ERR_IF; } status = FXmacBdRingAlloc(rxringptr, 1, &rxbd); if (status != FT_SUCCESS) { - FXMAC_OS_XMAC_PRINT_I("InitDma: Error allocating RxBD\r\n"); + FXMAC_OS_XMAC_PRINT_E("InitDma: Error allocating RxBD\r\n"); pbuf_free(p); return ERR_IF; } @@ -614,7 +613,7 @@ FError FXmacInitDma(FXmacOs *instance_p) status = FXmacBdRingToHw(rxringptr, 1, rxbd); if (status != FT_SUCCESS) { - FXMAC_OS_XMAC_PRINT_I("Error: committing RxBD to HW\r\n"); + FXMAC_OS_XMAC_PRINT_E("Error: committing RxBD to HW\r\n"); pbuf_free(p); FXmacBdRingUnAlloc(rxringptr, 1, rxbd); return ERR_IF; @@ -1063,6 +1062,13 @@ enum ethernet_link_status FXmacPhyReconnect(struct LwipPort *xmac_netif_p) } } +static void FxmacOsIntrHandler(s32 vector, void *args) +{ + isr_calling_flg++; + FXmacIntrHandler(vector,args); + isr_calling_flg--; +} + static void FXmacSetupIsr(FXmacOs *instance_p) { @@ -1076,7 +1082,7 @@ static void FXmacSetupIsr(FXmacOs *instance_p) FXmacSetHandler(&instance_p->instance, FXMAC_HANDLER_LINKCHANGE, FXmacLinkChange, instance_p); InterruptSetPriority(instance_p->instance.config.queue_irq_num[0], IRQ_PRIORITY_VALUE_12); - InterruptInstall(instance_p->instance.config.queue_irq_num[0], FXmacIntrHandler, &instance_p->instance, "fxmac"); + InterruptInstall(instance_p->instance.config.queue_irq_num[0], FxmacOsIntrHandler, &instance_p->instance, "fxmac"); InterruptUmask(instance_p->instance.config.queue_irq_num[0]); } @@ -1195,6 +1201,12 @@ FError FXmacOsInit(FXmacOs *instance_p) FXmacSetOptions(xmac_p, FXMAC_PROMISC_OPTION,0); } + status = FXmacSetMacAddress(xmac_p, (void*)(instance_p->hwaddr), 0); + if (status != FT_SUCCESS) + { + FXMAC_OS_XMAC_PRINT_E("In %s:Emac Mac Address set failed...\r\n",__func__); + } + /* close fcs check */ if(instance_p->config & FXMAC_OS_CONFIG_CLOSE_FCS_CHECK) { @@ -1250,7 +1262,7 @@ void *FXmacOsRx(FXmacOs *instance_p) /* return one packet from receive q */ p = (struct pbuf *)FXmacPqDequeue(&instance_p->recv_q); - return p; + return p; } static FError FXmacOsOutput(FXmacOs *instance_p, struct pbuf *p) @@ -1325,7 +1337,5 @@ FXmacOs *FXmacOsGetInstancePointer(FXmacOsControl *config_p) instance_p = &fxmac_os_instace[config_p->instance_id]; memcpy(&instance_p->mac_config,config_p,sizeof(FXmacOsControl)); - // instance_p->mac_config = *config_p; - return instance_p; } \ No newline at end of file diff --git a/drivers/eth/xmac/ft_os_xmac.h b/drivers/eth/xmac/ft_os_xmac.h index 2be387601abaacfcf9c6b47e2d6134caa1765188..ba4c1f1001ae696a256d056b1a344111841ccd23 100644 --- a/drivers/eth/xmac/ft_os_xmac.h +++ b/drivers/eth/xmac/ft_os_xmac.h @@ -46,8 +46,8 @@ extern "C" { #define FXMAX_RX_BDSPACE_LENGTH 0x20000 /* default set 64KB*/ #define FXMAX_TX_BDSPACE_LENGTH 0x20000 /* default set 64KB*/ -#define FXMAX_RX_PBUFS_LENGTH 64 -#define FXMAX_TX_PBUFS_LENGTH 64 +#define FXMAX_RX_PBUFS_LENGTH 128 +#define FXMAX_TX_PBUFS_LENGTH 128 #define FXMAX_MAX_HARDWARE_ADDRESS_LENGTH 6 @@ -70,9 +70,7 @@ extern "C" { /* Byte alignment of BDs */ #define BD_ALIGNMENT (FXMAC_DMABD_MINIMUM_ALIGNMENT*2) - /* frame queue */ - #define PQ_QUEUE_SIZE 4096 typedef struct diff --git a/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs index 755c27f6473e3a58bb1fb889adc9896fd3de0fba..2fe965a523e72eb1736dfda348ff99451b89d666 100644 --- a/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/eventgroup/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/eventgroup/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/sdkconfig b/example/freertos_feature/eventgroup/sdkconfig index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/eventgroup/sdkconfig +++ b/example/freertos_feature/eventgroup/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/eventgroup/sdkconfig.h b/example/freertos_feature/eventgroup/sdkconfig.h index 918ddd1ec09a52898e57bb516bba1cc9a40ec952..2e55f772e76d53ec6d106cb6e89fa66f67702aa0 100644 --- a/example/freertos_feature/eventgroup/sdkconfig.h +++ b/example/freertos_feature/eventgroup/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs index 755c27f6473e3a58bb1fb889adc9896fd3de0fba..2fe965a523e72eb1736dfda348ff99451b89d666 100644 --- a/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/interrupt/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/interrupt/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/sdkconfig b/example/freertos_feature/interrupt/sdkconfig index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/interrupt/sdkconfig +++ b/example/freertos_feature/interrupt/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/interrupt/sdkconfig.h b/example/freertos_feature/interrupt/sdkconfig.h index 918ddd1ec09a52898e57bb516bba1cc9a40ec952..2e55f772e76d53ec6d106cb6e89fa66f67702aa0 100644 --- a/example/freertos_feature/interrupt/sdkconfig.h +++ b/example/freertos_feature/interrupt/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs b/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs b/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs index 755c27f6473e3a58bb1fb889adc9896fd3de0fba..2fe965a523e72eb1736dfda348ff99451b89d666 100644 --- a/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/queue/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/queue/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/sdkconfig b/example/freertos_feature/queue/sdkconfig index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/queue/sdkconfig +++ b/example/freertos_feature/queue/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/queue/sdkconfig.h b/example/freertos_feature/queue/sdkconfig.h index 918ddd1ec09a52898e57bb516bba1cc9a40ec952..2e55f772e76d53ec6d106cb6e89fa66f67702aa0 100644 --- a/example/freertos_feature/queue/sdkconfig.h +++ b/example/freertos_feature/queue/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs b/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs b/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs index 755c27f6473e3a58bb1fb889adc9896fd3de0fba..2fe965a523e72eb1736dfda348ff99451b89d666 100644 --- a/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/resource/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/resource/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/sdkconfig b/example/freertos_feature/resource/sdkconfig index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/resource/sdkconfig +++ b/example/freertos_feature/resource/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/resource/sdkconfig.h b/example/freertos_feature/resource/sdkconfig.h index 918ddd1ec09a52898e57bb516bba1cc9a40ec952..2e55f772e76d53ec6d106cb6e89fa66f67702aa0 100644 --- a/example/freertos_feature/resource/sdkconfig.h +++ b/example/freertos_feature/resource/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs index 755c27f6473e3a58bb1fb889adc9896fd3de0fba..2fe965a523e72eb1736dfda348ff99451b89d666 100644 --- a/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/software_timer/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/software_timer/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/sdkconfig b/example/freertos_feature/software_timer/sdkconfig index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/software_timer/sdkconfig +++ b/example/freertos_feature/software_timer/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/software_timer/sdkconfig.h b/example/freertos_feature/software_timer/sdkconfig.h index 918ddd1ec09a52898e57bb516bba1cc9a40ec952..2e55f772e76d53ec6d106cb6e89fa66f67702aa0 100644 --- a/example/freertos_feature/software_timer/sdkconfig.h +++ b/example/freertos_feature/software_timer/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/freertos_feature/task/configs/d2000_aarch32_eg_configs b/example/freertos_feature/task/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/task/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/d2000_aarch64_eg_configs b/example/freertos_feature/task/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/task/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs index 762f633f8afa3c6078d879a5217fde4ebb007308..12c0784df24a15fadd89e09643ef5d891f82e7ed 100644 --- a/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs index be71262a2452358ec691234aa5b17dde2dbe2594..61cc997cbe184390ffc2756b9cf9213e657452e3 100644 --- a/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/task/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/task/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/sdkconfig b/example/freertos_feature/task/sdkconfig index be71262a2452358ec691234aa5b17dde2dbe2594..61cc997cbe184390ffc2756b9cf9213e657452e3 100644 --- a/example/freertos_feature/task/sdkconfig +++ b/example/freertos_feature/task/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task/sdkconfig.h b/example/freertos_feature/task/sdkconfig.h index c67c992e10fd4fdfd26abb100cb7bf3eacb79763..aa040345f1cc858b08aefcbb3bed2cc240295c3d 100644 --- a/example/freertos_feature/task/sdkconfig.h +++ b/example/freertos_feature/task/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs index 1f65e320b69006b78f6799dbb55fa3ddf9512eb1..464a31af9bb3111d91fad1699c91b41de9317519 100644 --- a/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs index b6f76f4c15636aab052b117d81fad5dc35c48c6e..64e6b4b7a6ae1664e07af0d9c84a440dabc972c1 100644 --- a/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs index dcbfaedf6532dda1df4b1438d6013f6e731b9ed0..fc31cd0b27be11b5e09995278c509299162fa4e9 100644 --- a/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs index 7e45bd9490d83a614f2202447656da11d3655eef..7e2efa4fba523e780f910a826b7f13a9552e4bbe 100644 --- a/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs index 755c27f6473e3a58bb1fb889adc9896fd3de0fba..2fe965a523e72eb1736dfda348ff99451b89d666 100644 --- a/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000q_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/e2000q_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs b/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs index f42811a5bdbc43bc5075b6ca339f1ffd7fe53df3..4c5b2c49d6edae2d8456f3d083606aa9f62a3361 100644 --- a/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs +++ b/example/freertos_feature/task_notify/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs b/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs index e0ec68fb05bc7eebbe4490f0fa4b12cad6a30bb7..da9c1f8182b98ecf314c436f79ccbf0a31c79673 100644 --- a/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs +++ b/example/freertos_feature/task_notify/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/sdkconfig b/example/freertos_feature/task_notify/sdkconfig index bb62840c8620a9723ca3189cb8cff1f1b5e48346..9c50f2b0368b0cb7549298c291755806fc32ae00 100644 --- a/example/freertos_feature/task_notify/sdkconfig +++ b/example/freertos_feature/task_notify/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/freertos_feature/task_notify/sdkconfig.h b/example/freertos_feature/task_notify/sdkconfig.h index 918ddd1ec09a52898e57bb516bba1cc9a40ec952..2e55f772e76d53ec6d106cb6e89fa66f67702aa0 100644 --- a/example/freertos_feature/task_notify/sdkconfig.h +++ b/example/freertos_feature/task_notify/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs b/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs index c7763e5c6e06f10149ed79643f473980a5a3ca66..a0b4722fc0ba86d5336a9b9c072c99f41747c489 100644 --- a/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs +++ b/example/network/gmac_lwip_test/configs/d2000_aarch32_eg_configs @@ -211,8 +211,182 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# CONFIG_LWIP_FGMAC=y # CONFIG_LWIP_FXMAC is not set +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +CONFIG_LWIP_USE_MEM_POOL=y +# CONFIG_LWIP_USE_MEM_HEAP is not set +CONFIG_MEMP_NUM_PBUF=64 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +# CONFIG_LWIP_IP4_REASSEMBLY is not set +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +# CONFIG_LWIP_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -233,4 +407,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs b/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs index 0e6700964b290b2299df5f6cbbf08a54650c60cb..b4dd0538e9dd1f344d719faa6d2faf2beef027f6 100644 --- a/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs +++ b/example/network/gmac_lwip_test/configs/d2000_aarch64_eg_configs @@ -207,8 +207,182 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# CONFIG_LWIP_FGMAC=y # CONFIG_LWIP_FXMAC is not set +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +CONFIG_LWIP_USE_MEM_POOL=y +# CONFIG_LWIP_USE_MEM_HEAP is not set +CONFIG_MEMP_NUM_PBUF=64 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +# CONFIG_LWIP_IP4_REASSEMBLY is not set +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +# CONFIG_LWIP_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -229,4 +403,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs b/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs index 7b0b40a677e3d8285e84d6b4d4d6aa3f56ba6433..366e33e6ed3e018163a1e1ea359632d030429b0b 100644 --- a/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs +++ b/example/network/gmac_lwip_test/configs/ft2004_aarch32_eg_configs @@ -211,8 +211,182 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# CONFIG_LWIP_FGMAC=y # CONFIG_LWIP_FXMAC is not set +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +CONFIG_LWIP_USE_MEM_POOL=y +# CONFIG_LWIP_USE_MEM_HEAP is not set +CONFIG_MEMP_NUM_PBUF=64 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +# CONFIG_LWIP_IP4_REASSEMBLY is not set +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +# CONFIG_LWIP_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -233,4 +407,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs b/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs index e774beb2acd0ff6f6b9ba5028af42e131eddc826..da6f3c910bdebccaec96c5e09c8997c38c85381f 100644 --- a/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs +++ b/example/network/gmac_lwip_test/configs/ft2004_aarch64_eg_configs @@ -207,8 +207,182 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# CONFIG_LWIP_FGMAC=y # CONFIG_LWIP_FXMAC is not set +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +CONFIG_LWIP_USE_MEM_POOL=y +# CONFIG_LWIP_USE_MEM_HEAP is not set +CONFIG_MEMP_NUM_PBUF=64 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +# CONFIG_LWIP_IP4_REASSEMBLY is not set +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +# CONFIG_LWIP_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -229,4 +403,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/gmac_lwip_test/sdkconfig b/example/network/gmac_lwip_test/sdkconfig index 0e6700964b290b2299df5f6cbbf08a54650c60cb..b4dd0538e9dd1f344d719faa6d2faf2beef027f6 100644 --- a/example/network/gmac_lwip_test/sdkconfig +++ b/example/network/gmac_lwip_test/sdkconfig @@ -207,8 +207,182 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# CONFIG_LWIP_FGMAC=y # CONFIG_LWIP_FXMAC is not set +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +CONFIG_LWIP_USE_MEM_POOL=y +# CONFIG_LWIP_USE_MEM_HEAP is not set +CONFIG_MEMP_NUM_PBUF=64 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +# CONFIG_LWIP_IP4_REASSEMBLY is not set +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +# CONFIG_LWIP_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -229,4 +403,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/gmac_lwip_test/sdkconfig.h b/example/network/gmac_lwip_test/sdkconfig.h index d487d29a86d071026f96083c1e862b16afe2fe39..985d2d5055d0c9b03c41de585582457410f4bb73 100644 --- a/example/network/gmac_lwip_test/sdkconfig.h +++ b/example/network/gmac_lwip_test/sdkconfig.h @@ -181,8 +181,156 @@ /* LWIP Configuration */ +/* LWIP Port Configuration */ + #define CONFIG_LWIP_FGMAC /* CONFIG_LWIP_FXMAC is not set */ +/* end of LWIP Port Configuration */ +#define CONFIG_LWIP_LOCAL_HOSTNAME "phytium" + +/* memory configuration */ + +#define CONFIG_LWIP_USE_MEM_POOL +/* CONFIG_LWIP_USE_MEM_HEAP is not set */ +#define CONFIG_MEMP_NUM_PBUF 64 +#define CONFIG_MEM_ALIGNMENT 64 +/* end of memory configuration */ + +/* NETWORK_INTERFACE_OPTIONS */ + +/* CONFIG_LWIP_NETIF_API is not set */ +/* CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set */ +/* end of NETWORK_INTERFACE_OPTIONS */ + +/* LOOPIF */ + +#define CONFIG_LWIP_NETIF_LOOPBACK +#define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8 +/* end of LOOPIF */ + +/* SLIPIF */ + +/* CONFIG_LWIP_SLIP_SUPPORT is not set */ +/* end of SLIPIF */ + +/* Pbuf options */ + +#define CONFIG_PBUF_POOL_BUFSIZE 2 +/* end of Pbuf options */ + +/* Internal Memory Pool Sizes */ + +#define CONFIG_PBUF_POOL_SIZE 1 +/* end of Internal Memory Pool Sizes */ +#define CONFIG_LWIP_MAX_SOCKETS 10 + +/* LWIP RAW API */ + +#define CONFIG_LWIP_MAX_RAW_PCBS 16 +/* end of LWIP RAW API */ + +/* TCP */ + +#define CONFIG_LWIP_MAX_ACTIVE_TCP 16 +#define CONFIG_LWIP_MAX_LISTENING_TCP 16 +#define CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION +#define CONFIG_LWIP_TCP_MAXRTX 12 +#define CONFIG_LWIP_TCP_SYNMAXRTX 12 +#define CONFIG_LWIP_TCP_MSS 1440 +#define CONFIG_LWIP_TCP_TMR_INTERVAL 250 +#define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 +#define CONFIG_LWIP_TCP_WND_DEFAULT 5744 +#define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 +#define CONFIG_LWIP_TCP_QUEUE_OOSEQ +/* CONFIG_LWIP_TCP_SACK_OUT is not set */ +#define CONFIG_LWIP_TCP_OVERSIZE_MSS +/* CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set */ +/* CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set */ +/* end of TCP */ + +/* UDP */ + +#define CONFIG_LWIP_MAX_UDP_PCBS 16 +#define CONFIG_LWIP_UDP_RECVMBOX_SIZE 6 +/* CONFIG_LWIP_NETBUF_RECVINFO is not set */ +/* end of UDP */ + +/* IPv4 */ + +/* CONFIG_USE_IPV4_ONLY is not set */ +/* CONFIG_LWIP_IP4_REASSEMBLY is not set */ +#define CONFIG_LWIP_IP4_FRAG +/* CONFIG_LWIP_IP_FORWARD is not set */ +#define CONFIG_IP_REASS_MAX_PBUFS 16 +/* end of IPv4 */ + +/* ICMP */ + +#define CONFIG_LWIP_ICMP +/* CONFIG_LWIP_MULTICAST_PING is not set */ +/* CONFIG_LWIP_BROADCAST_PING is not set */ +/* end of ICMP */ + +/* DHCP */ + +/* CONFIG_LWIP_DHCP_ENABLE is not set */ +#define CONFIG_LWIP_DHCP_DOES_ARP_CHECK +/* CONFIG_LWIP_DHCP_GET_NTP_SRV is not set */ +/* CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set */ +/* CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set */ +#define CONFIG_LWIP_DHCP_OPTIONS_LEN 68 +#define CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +/* end of DHCP */ + +/* AUTOIP */ + +/* CONFIG_LWIP_AUTOIP is not set */ +/* end of AUTOIP */ + +/* DNS */ + +#define CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES +/* end of DNS */ + +/* TCP options */ + +#define CONFIG_LWIP_TCP_RTO_TIME 1500 +/* end of TCP options */ +/* CONFIG_LWIP_TCPIP_CORE_LOCKING is not set */ + +/* socket */ + +/* CONFIG_LWIP_SO_LINGER is not set */ +#define CONFIG_LWIP_SO_REUSE +#define CONFIG_LWIP_SO_REUSE_RXTOALL +/* end of socket */ +/* CONFIG_LWIP_STATS is not set */ + +/* PPP */ + +/* CONFIG_LWIP_PPP_SUPPORT is not set */ +#define CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE 3 +#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 +/* end of PPP */ + +/* Checksums */ + +/* CONFIG_LWIP_CHECKSUM_CHECK_IP is not set */ +/* CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set */ +#define CONFIG_LWIP_CHECKSUM_CHECK_ICMP +/* end of Checksums */ + +/* ipv6 */ + +#define CONFIG_LWIP_IPV6 +/* CONFIG_LWIP_IPV6_AUTOCONFIG is not set */ +#define CONFIG_LWIP_IPV6_NUM_ADDRESSES 3 +/* CONFIG_LWIP_IPV6_FORWARD is not set */ +#define CONFIG_LWIP_IP6_FRAG +/* CONFIG_LWIP_IP6_REASSEMBLY is not set */ +/* end of ipv6 */ +/* CONFIG_LWIP_DEBUG is not set */ /* end of LWIP Configuration */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ @@ -200,6 +348,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/network/sockets/udp_multicast/Kconfig b/example/network/sockets/udp_multicast/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..efe6358f3e8474cd6ad7e71489490ab2ffe2ee5a --- /dev/null +++ b/example/network/sockets/udp_multicast/Kconfig @@ -0,0 +1,19 @@ +mainmenu "Phytium FreeRTOS Configuration" + + menu "Project Configuration" + + config TARGET_NAME + string "Build Target Name" + default "freertos" + help + Build Target name for the demo + + + if TARGET_E2000 + source "./src/Kconfig" + endif + + endmenu + +source "$(FREERTOS_SDK_ROOT)/Kconfig" + diff --git a/example/network/sockets/udp_multicast/README.md b/example/network/sockets/udp_multicast/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9853b9bd42cc9542b569d890d3157ed9fd81b77a --- /dev/null +++ b/example/network/sockets/udp_multicast/README.md @@ -0,0 +1,237 @@ + + + +# lwip udp multicast test on freertos + +## 1. 例程介绍 + +本例程示范了freertos环境下的lwip移植。 +本例程目前支持在freertos下,移植lwip,并且支持基于socket 编程风格的 IPV4 & IPV6 UDP multicast 特性。 + +## 2. 如何使用例程 + +本例程需要用到 +- Phytium开发板(E2000) +- [Phytium freeRTOS SDK](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk) +- [Phytium standalone SDK](https://gitee.com/phytium_embedded/phytium-standalone-sdk) +### 2.1 硬件配置方法 + +本例程支持的硬件平台包括 + +- E2000D/E2000Q + +对应的配置项是 + +- CONFIG_TARGET_E2000D +- CONFIG_TARGET_E2000Q + +### 2.2 SDK配置方法 + +本例程需要: + +- 使能LWIP + +对应的配置项是: + +- CONFIG_USE_LWIP +- CONFIG_USE_LETTER_SHELL + + +本例子已经提供好具体的编译指令,以下进行介绍: +- make 将目录下的工程进行编译 +- make clean 将目录下的工程进行清理 +- make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址 +- make load_e2000d_aarch64 将预设64bit e2000d 下的配置加载至工程中 +- make load_e2000d_aarch32 将预设32bit e2000d 下的配置加载至工程中 +- make load_e2000q_aarch64 将预设64bit e2000q 下的配置加载至工程中 +- make load_e2000q_aarch32 将预设32bit e2000q 下的配置加载至工程中 +- make test_code 编译./test 目录下的测试代码 +- make menuconfig 配置目录下的参数变量 +- make backup_kconfig 将目录下的sdkconfig 备份到./configs下 + +具体使用方法为: +- 在当前目录下 +- 执行以上指令 + +### 2.3 构建和下载 + +#### 2.3.1 构建过程 + +- 在host侧完成配置 +>对于其它平台,使用对于的默认配置,如E2000D `make load_e2000d_aarch32` + +- 选择目标平台 +``` +make load_e2000d_aarch32 +``` + +- 选择例程需要的配置 +``` +make menuconfig +``` + +- 将编译出的镜像放置到tftp目录下 +``` +make boot +``` + +- 以下命令用于编译测试用的例程 ,注意此时需要使用到编译环境中的gcc编译器,请确认您的环境能够进行此操作。 + +``` +make test_code +``` + + +#### 2.3.2 下载过程 + +- host侧设置重启host侧tftp服务器 +``` +sudo service tftpd-hpa start +``` + +- 开发板侧使用bootelf命令跳转 +``` +setenv ipaddr 192.168.4.20 +setenv serverip 192.168.4.50 +setenv gatewayip 192.168.4.1 +tftpboot 0x90100000 freertos.elf +bootelf -p 0x90100000 +``` + +### 2.4 输出与实验现象 + +- 启动进入后,根据连接的xmac口,输入指令完成网口初始化 + + + +#### 2.4.1 基于IPv4下初始化 + +- 输入以下命令 + +``` +make menuconfig +``` + +- 需将Multicast IP type 选为 IPV4 + +![](./pic/ipv4_config.png) + +- 输入以下命令,初始化LWIP网络协议栈, 依次配置ip地址,子网掩码,网关地址和退出时间,运行完成退出后LWIP协议栈会被暂时去使能 + +- 关闭IPv6 选项 +![](./pic/ipv4_config2.png) + + +``` +xmac probe [device id] [interface id] +``` + +- 其中device id 为控制器id +- interface id ,0 为rgmii ,1 为sgmii + +![xmac_probe_ipv4](./pic/xmac_probe.png "xmac_probe.png") + +![ping](./pic/ping.png "ping.png") + +#### 2.4.2 IPv6下初始化 + +- 输入以下命令 + +``` +make menuconfig +``` + +- 需将Multicast IP type 选为 IPV6 + +![](./pic/ipv6_config.png) + + +- 关闭仅仅使用IPv4 选项 + +![](./pic/DisableNotusingIPV4attheaSametime.png) + + +- 输入以下命令,初始化LWIP网络协议栈, 依次配置ip地址,子网掩码,网关地址和退出时间,运行完成退出后LWIP协议栈会被暂时去使能 + +``` +xmac probe [device id] [interface id] +``` + +- 其中device id 为控制器id +- interface id ,0 为rgmii ,1 为sgmii + +![xmac_probe](./pic/xmac_probe.png "xmac_probe.png") +![xmac_probe2](./pic/xmac_probe_ipv6_2.png "xmac_probe_ipv6_2.png") + +![ping](./pic/ping_ipv6.png "ping_ipv6.png") + + +#### 2.4.3 进行multicast 测试 + +- 完成2.4.1 / 2.4.2 之后 ,可以进行multcast 的相关实验 ,以下以ipv6 的实验为例 +- 在串口终端上输入以下指令 +``` +multicast +``` +- 在编译器环境下执行 +``` +./multicast_server_ipv6.out +``` + +- 串口终端下打印为 + +![](./pic/串口终端打印.png) + +- 使用测试程序打印如下 + +![](./pic/测试终端打印.png) + + +#### 2.4.2 提供 + +## 3. 如何解决问题 + +1. 如何选择demo板的配置 + +- 开发者在编译终端下使用以下命令 +```shell + make menuconfig +``` + +![](./pic/demo_board_menuconfig.png) + + +2. 如果开发者使用E2000 demo板应该如何进行实验: +![](./pic/e2000demo板全貌.jpg) + +- 开发者在串口终端上请输入以下命令对控制器进行初始化 +```shell + xmac probe 0 1 +``` + +## 4. 修改历史记录 + +v0.1.0 完成第一版初始化 + + diff --git a/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs b/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..6417f2c5c476931ee6317cf7dcaffab3b2f0d8de --- /dev/null +++ b/example/network/sockets/udp_multicast/configs/e2000d_aarch32_eg_configs @@ -0,0 +1,434 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000_lwip_multicast" + +# +# Example Configuration +# +CONFIG_EXAMPLE_IPV4_ONLY=y +# CONFIG_EXAMPLE_IPV6_ONLY is not set +CONFIG_EXAMPLE_IPV4=y +CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR="232.10.12.10" +CONFIG_EXAMPLE_PORT=6750 +# CONFIG_EXAMPLE_LOOPBACK is not set +CONFIG_EXAMPLE_MULTICAST_TTL=255 +# CONFIG_EXAMPLE_MULTICAST_LISTEN_ALL_IF is not set +CONFIG_EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF=y +# end of Example Configuration + +# +# E2000 board Configuration +# +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +CONFIG_LOG_VERBOS=y +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=128 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=45 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +# CONFIG_LWIP_IPV6 is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git a/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs b/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..beb1c22b80c9daa166ed9f4da8dd5565f40fa9f4 --- /dev/null +++ b/example/network/sockets/udp_multicast/configs/e2000d_aarch64_eg_configs @@ -0,0 +1,436 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000_lwip_multicast" + +# +# Example Configuration +# +# CONFIG_EXAMPLE_IPV4_ONLY is not set +CONFIG_EXAMPLE_IPV6_ONLY=y +CONFIG_EXAMPLE_IPV6=y +CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR="FF02::FD" +CONFIG_EXAMPLE_PORT=6750 +# CONFIG_EXAMPLE_LOOPBACK is not set +CONFIG_EXAMPLE_MULTICAST_TTL=255 +CONFIG_EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF=y +# end of Example Configuration + +# +# E2000 board Configuration +# +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +# CONFIG_TARGET_E2000Q is not set +CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +CONFIG_LOG_VERBOS=y +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=128 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=45 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +CONFIG_LWIP_IP6_REASSEMBLY=y +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git a/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs b/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..c82eb6f4cddf1e3f57172cba5e774e10ba7580ae --- /dev/null +++ b/example/network/sockets/udp_multicast/configs/e2000q_aarch32_eg_configs @@ -0,0 +1,441 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000_lwip_multicast" + +# +# Example Configuration +# +CONFIG_EXAMPLE_IPV4_ONLY=y +# CONFIG_EXAMPLE_IPV6_ONLY is not set +CONFIG_EXAMPLE_IPV4=y +CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR="232.10.12.10" +CONFIG_EXAMPLE_PORT=6750 +# CONFIG_EXAMPLE_LOOPBACK is not set +CONFIG_EXAMPLE_MULTICAST_TTL=255 +CONFIG_EXAMPLE_MULTICAST_LISTEN_ALL_IF=y +# CONFIG_EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF is not set +# end of Example Configuration + +# +# E2000 board Configuration +# +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +CONFIG_LOG_VERBOS=y +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=128 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=45 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git a/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs b/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..553b290de3e358200acc919572597c3a8fd36b8d --- /dev/null +++ b/example/network/sockets/udp_multicast/configs/e2000q_aarch64_eg_configs @@ -0,0 +1,436 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000_lwip_multicast" + +# +# Example Configuration +# +# CONFIG_EXAMPLE_IPV4_ONLY is not set +CONFIG_EXAMPLE_IPV6_ONLY=y +CONFIG_EXAMPLE_IPV6=y +CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR="FF02::FD" +CONFIG_EXAMPLE_PORT=6750 +# CONFIG_EXAMPLE_LOOPBACK is not set +CONFIG_EXAMPLE_MULTICAST_TTL=255 +CONFIG_EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF=y +# end of Example Configuration + +# +# E2000 board Configuration +# +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +CONFIG_LOG_VERBOS=y +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=128 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=45 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +CONFIG_LWIP_IP6_REASSEMBLY=y +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git a/example/network/sockets/udp_multicast/main.c b/example/network/sockets/udp_multicast/main.c new file mode 100644 index 0000000000000000000000000000000000000000..c9b71b6c7b079af6aa3696da14eca1d95916e71f --- /dev/null +++ b/example/network/sockets/udp_multicast/main.c @@ -0,0 +1,43 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: main.c + * Date: 2022-02-24 13:42:19 + * LastEditTime: 2022-03-21 17:01:57 + * Description:  This file is for + * + * Modify History: + * Ver   Who        Date         Changes + * ----- ------     --------    -------------------------------------- + */ +#include +#include "FreeRTOS.h" +#include "task.h" +#include "shell_port.h" + +int main() +{ + BaseType_t ret = pdPASS; + + ret = LSUserShellTask(); + if(ret != pdPASS) + goto FAIL_EXIT; + + vTaskStartScheduler(); /* 启动任务,开启调度 */ + while (1); /* 正常不会执行到这里 */ + +FAIL_EXIT: + printf("failed 0x%x \r\n", ret); + + return 0; +} \ No newline at end of file diff --git a/example/network/sockets/udp_multicast/makefile b/example/network/sockets/udp_multicast/makefile new file mode 100644 index 0000000000000000000000000000000000000000..5e873547e7e6a78d68955e742d74a208da891f5c --- /dev/null +++ b/example/network/sockets/udp_multicast/makefile @@ -0,0 +1,30 @@ +# 指定工程项目根目录为当前(只能指定一个目录) +export PROJECT_DIR ?= $(shell pwd) +# 用户添加的源文件夹和头文件夹(可以指定多个) +export USR_SRC_DIR ?= $(PROJECT_DIR) \ + $(PROJECT_DIR)/src +export USR_INC_DIR ?= $(PROJECT_DIR) \ + $(PROJECT_DIR)/inc + +# 用户定义的编译目标文件上传路径 +ifeq ($(OS),Windows_NT) +USR_BOOT_DIR ?= /d/tftboot +else +USR_BOOT_DIR ?= /mnt/d/tftboot +endif + + +# 设置启动镜像名 +BOOT_IMG_NAME ?= freertos + +# 指定编译freertos项目使用的makefile +include $(FREERTOS_SDK_ROOT)/make/build_freertos.mk + +test_code: + $(MAKE) -C $(PROJECT_DIR)/test/ all + +# 完成编译 +boot: + make -j + cp ./$(CONFIG_TARGET_NAME).elf $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).elf + cp ./$(CONFIG_TARGET_NAME).bin $(USR_BOOT_DIR)/$(BOOT_IMG_NAME).bin diff --git a/example/network/sockets/udp_multicast/pic/DisableNotusingIPV4attheaSametime.png b/example/network/sockets/udp_multicast/pic/DisableNotusingIPV4attheaSametime.png new file mode 100644 index 0000000000000000000000000000000000000000..dc7376f200eecd031ffaf99cc7097ab1b6f6a274 Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/DisableNotusingIPV4attheaSametime.png differ diff --git a/example/network/sockets/udp_multicast/pic/demo_board_menuconfig.png b/example/network/sockets/udp_multicast/pic/demo_board_menuconfig.png new file mode 100644 index 0000000000000000000000000000000000000000..568a59aa55101a0d291ba17babde1980d17b080c Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/demo_board_menuconfig.png differ diff --git "a/example/network/sockets/udp_multicast/pic/e2000demo\346\235\277\345\205\250\350\262\214.jpg" "b/example/network/sockets/udp_multicast/pic/e2000demo\346\235\277\345\205\250\350\262\214.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..8134df9b5ad3f843694953e65757db31e7b9eab9 Binary files /dev/null and "b/example/network/sockets/udp_multicast/pic/e2000demo\346\235\277\345\205\250\350\262\214.jpg" differ diff --git a/example/network/sockets/udp_multicast/pic/ipv4_config.png b/example/network/sockets/udp_multicast/pic/ipv4_config.png new file mode 100644 index 0000000000000000000000000000000000000000..11e7ecde1c6a44d6f1ef1de5b80f5491ee7f0ae1 Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/ipv4_config.png differ diff --git a/example/network/sockets/udp_multicast/pic/ipv6_config.png b/example/network/sockets/udp_multicast/pic/ipv6_config.png new file mode 100644 index 0000000000000000000000000000000000000000..d32a32880d5c6a1c321ccf2a4260f0c1417f9257 Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/ipv6_config.png differ diff --git a/example/network/sockets/udp_multicast/pic/ping.png b/example/network/sockets/udp_multicast/pic/ping.png new file mode 100644 index 0000000000000000000000000000000000000000..4df451934d172b9bd0870228ad29d0d6c45937eb Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/ping.png differ diff --git a/example/network/sockets/udp_multicast/pic/ping_ipv6.png b/example/network/sockets/udp_multicast/pic/ping_ipv6.png new file mode 100644 index 0000000000000000000000000000000000000000..56641587499a902694192d1f61b997dc39394ca3 Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/ping_ipv6.png differ diff --git a/example/network/sockets/udp_multicast/pic/xmac_probe.png b/example/network/sockets/udp_multicast/pic/xmac_probe.png new file mode 100644 index 0000000000000000000000000000000000000000..59f8c2f556710120cfcd0a7943a34054665da3ba Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/xmac_probe.png differ diff --git a/example/network/sockets/udp_multicast/pic/xmac_probe_ipv4.png b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv4.png new file mode 100644 index 0000000000000000000000000000000000000000..584686e115481cc7156df9172e83256fde15088a Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv4.png differ diff --git a/example/network/sockets/udp_multicast/pic/xmac_probe_ipv4_2.png b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv4_2.png new file mode 100644 index 0000000000000000000000000000000000000000..0e8fd18bc82ef2a5b2474492133fb47d8fbe2086 Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv4_2.png differ diff --git a/example/network/sockets/udp_multicast/pic/xmac_probe_ipv6.png b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv6.png new file mode 100644 index 0000000000000000000000000000000000000000..33b748ed3bdcca04e59f44cb0d00ef9967041f55 Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv6.png differ diff --git a/example/network/sockets/udp_multicast/pic/xmac_probe_ipv6_2.png b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv6_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7dca5c3e883fbde10d9818d8854e3b1ed344d56e Binary files /dev/null and b/example/network/sockets/udp_multicast/pic/xmac_probe_ipv6_2.png differ diff --git "a/example/network/sockets/udp_multicast/pic/\344\270\262\345\217\243\347\273\210\347\253\257\346\211\223\345\215\260.png" "b/example/network/sockets/udp_multicast/pic/\344\270\262\345\217\243\347\273\210\347\253\257\346\211\223\345\215\260.png" new file mode 100644 index 0000000000000000000000000000000000000000..946b6c80ab4d3d4283493ac7a8c5b4d5d223c00f Binary files /dev/null and "b/example/network/sockets/udp_multicast/pic/\344\270\262\345\217\243\347\273\210\347\253\257\346\211\223\345\215\260.png" differ diff --git "a/example/network/sockets/udp_multicast/pic/\346\265\213\350\257\225\347\273\210\347\253\257\346\211\223\345\215\260.png" "b/example/network/sockets/udp_multicast/pic/\346\265\213\350\257\225\347\273\210\347\253\257\346\211\223\345\215\260.png" new file mode 100644 index 0000000000000000000000000000000000000000..1a3ca3db2c4c81ecaeab4ddda2251fa7cd23a47b Binary files /dev/null and "b/example/network/sockets/udp_multicast/pic/\346\265\213\350\257\225\347\273\210\347\253\257\346\211\223\345\215\260.png" differ diff --git a/example/network/sockets/udp_multicast/sdkconfig b/example/network/sockets/udp_multicast/sdkconfig new file mode 100644 index 0000000000000000000000000000000000000000..553b290de3e358200acc919572597c3a8fd36b8d --- /dev/null +++ b/example/network/sockets/udp_multicast/sdkconfig @@ -0,0 +1,436 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000_lwip_multicast" + +# +# Example Configuration +# +# CONFIG_EXAMPLE_IPV4_ONLY is not set +CONFIG_EXAMPLE_IPV6_ONLY=y +CONFIG_EXAMPLE_IPV6=y +CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR="FF02::FD" +CONFIG_EXAMPLE_PORT=6750 +# CONFIG_EXAMPLE_LOOPBACK is not set +CONFIG_EXAMPLE_MULTICAST_TTL=255 +CONFIG_EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF=y +# end of Example Configuration + +# +# E2000 board Configuration +# +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +CONFIG_LOG_VERBOS=y +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +# CONFIG_LOG_WARN is not set +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=128 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +# CONFIG_USE_IPV4_ONLY is not set +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=45 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +CONFIG_LWIP_IP6_REASSEMBLY=y +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git a/example/network/sockets/udp_multicast/sdkconfig.h b/example/network/sockets/udp_multicast/sdkconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..be41343683618852a3345e70976c59bb7c67120b --- /dev/null +++ b/example/network/sockets/udp_multicast/sdkconfig.h @@ -0,0 +1,381 @@ +#ifndef SDK_CONFIG_H__ +#define SDK_CONFIG_H__ + +/* Project Configuration */ + +#define CONFIG_TARGET_NAME "e2000_lwip_multicast" + +/* Example Configuration */ + +/* CONFIG_EXAMPLE_IPV4_ONLY is not set */ +#define CONFIG_EXAMPLE_IPV6_ONLY +#define CONFIG_EXAMPLE_IPV6 +#define CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR "FF02::FD" +#define CONFIG_EXAMPLE_PORT 6750 +/* CONFIG_EXAMPLE_LOOPBACK is not set */ +#define CONFIG_EXAMPLE_MULTICAST_TTL 255 +#define CONFIG_EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF +/* end of Example Configuration */ + +/* E2000 board Configuration */ + +/* CONFIG_BOARD_TYPE_B is not set */ +/* CONFIG_BOARD_TYPE_C is not set */ +/* CONFIG_BOARD_TYPE_A is not set */ +#define CONFIG_BOARD_TYPE_DEMO +/* end of E2000 board Configuration */ +/* end of Project Configuration */ + +/* Standalone Setting */ + +#define CONFIG_USE_FREERTOS + +/* Arch Configuration */ + +/* CONFIG_TARGET_ARMV8_AARCH32 is not set */ +#define CONFIG_TARGET_ARMV8_AARCH64 +#define CONFIG_USE_CACHE +#define CONFIG_USE_MMU +#define CONFIG_USE_SYS_TICK +/* CONFIG_MMU_DEBUG_PRINTS is not set */ +/* end of Arch Configuration */ + +/* Board Configuration */ + +/* CONFIG_TARGET_F2000_4 is not set */ +/* CONFIG_TARGET_D2000 is not set */ +#define CONFIG_TARGET_E2000Q +/* CONFIG_TARGET_E2000D is not set */ +/* CONFIG_TARGET_E2000S is not set */ +#define CONFIG_TARGET_E2000 +#define CONFIG_DEFAULT_DEBUG_PRINT_UART1 +/* CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set */ +/* CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set */ +/* end of Board Configuration */ + +/* Components Configuration */ + +/* CONFIG_USE_SPI is not set */ +/* CONFIG_USE_QSPI is not set */ +#define CONFIG_USE_GIC +#define CONFIG_ENABLE_GICV3 +#define CONFIG_USE_SERIAL + +/* Usart Configuration */ + +#define CONFIG_ENABLE_Pl011_UART +/* end of Usart Configuration */ +/* CONFIG_USE_GPIO is not set */ +#define CONFIG_USE_ETH + +/* Eth Configuration */ + +#define CONFIG_ENABLE_FXMAC +/* CONFIG_ENABLE_FGMAC is not set */ +#define CONFIG_FXMAC_PHY_COMMON +/* CONFIG_FXMAC_PHY_YT is not set */ +/* end of Eth Configuration */ +/* CONFIG_USE_CAN is not set */ +/* CONFIG_USE_I2C is not set */ +/* CONFIG_USE_TIMER is not set */ +/* CONFIG_USE_MIO is not set */ +/* CONFIG_USE_SDMMC is not set */ +/* CONFIG_USE_PCIE is not set */ +/* CONFIG_USE_WDT is not set */ +/* CONFIG_USE_DMA is not set */ +/* CONFIG_USE_NAND is not set */ +/* CONFIG_USE_RTC is not set */ +/* CONFIG_USE_SATA is not set */ +/* CONFIG_USE_USB is not set */ +/* CONFIG_USE_ADC is not set */ +/* CONFIG_USE_PWM is not set */ +/* CONFIG_USE_IPC is not set */ +/* end of Components Configuration */ +#define CONFIG_USE_NEW_LIBC +/* end of Standalone Setting */ + +/* Building Option */ + +#define CONFIG_LOG_VERBOS +/* CONFIG_LOG_DEBUG is not set */ +/* CONFIG_LOG_INFO is not set */ +/* CONFIG_LOG_WARN is not set */ +/* CONFIG_LOG_ERROR is not set */ +/* CONFIG_LOG_NONE is not set */ +#define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG +#define CONFIG_INTERRUPT_ROLE_MASTER +/* CONFIG_INTERRUPT_ROLE_SLAVE is not set */ +/* CONFIG_LOG_EXTRA_INFO is not set */ +/* CONFIG_BOOTUP_DEBUG_PRINTS is not set */ + +/* Linker Options */ + +/* CONFIG_AARCH32_RAM_LD is not set */ +#define CONFIG_AARCH64_RAM_LD +/* CONFIG_USER_DEFINED_LD is not set */ +#define CONFIG_LINK_SCRIPT_ROM +#define CONFIG_ROM_START_UP_ADDR 0x80100000 +#define CONFIG_ROM_SIZE_MB 1 +#define CONFIG_LINK_SCRIPT_RAM +#define CONFIG_RAM_START_UP_ADDR 0x80500000 +#define CONFIG_RAM_SIZE_MB 128 +#define CONFIG_HEAP_SIZE 1 +#define CONFIG_STACK_SIZE 0x100000 +#define CONFIG_FPU_STACK_SIZE 0x1000 +/* end of Linker Options */ + +/* Compiler Options */ + +#define CONFIG_OUTPUT_BINARY +/* end of Compiler Options */ +/* end of Building Option */ + +/* Component Configuration */ + +/* Freertos Uart Drivers */ + +#define CONFIG_FREERTOS_USE_UART +/* end of Freertos Uart Drivers */ + +/* Freertos Pwm Drivers */ + +/* CONFIG_FREERTOS_USE_PWM is not set */ +/* end of Freertos Pwm Drivers */ + +/* Freertos Qspi Drivers */ + +/* CONFIG_FREERTOS_USE_QSPI is not set */ +/* end of Freertos Qspi Drivers */ + +/* Freertos Wdt Drivers */ + +/* CONFIG_FREERTOS_USE_WDT is not set */ +/* end of Freertos Wdt Drivers */ + +/* Freertos Eth Drivers */ + +#define CONFIG_FREERTOS_USE_XMAC +/* end of Freertos Eth Drivers */ + +/* Freertos Gpio Drivers */ + +/* CONFIG_FREERTOS_USE_GPIO is not set */ +/* end of Freertos Gpio Drivers */ + +/* Freertos Spim Drivers */ + +/* CONFIG_FREERTOS_USE_FSPIM is not set */ +/* end of Freertos Spim Drivers */ + +/* Freertos DMA Drivers */ + +/* CONFIG_FREERTOS_USE_FDDMA is not set */ +/* CONFIG_FREERTOS_USE_FGDMA is not set */ +/* end of Freertos DMA Drivers */ + +/* Freertos MMC Drivers */ + +/* CONFIG_FREERTOS_USE_FSDIO is not set */ +/* end of Freertos MMC Drivers */ + +/* Freertos Adc Drivers */ + +/* CONFIG_FREERTOS_USE_ADC is not set */ +/* end of Freertos Adc Drivers */ + +/* Freertos Can Drivers */ + +/* CONFIG_FREERTOS_USE_CAN is not set */ +/* end of Freertos Can Drivers */ +/* end of Component Configuration */ + +/* FreeRTOS Setting */ + +#define CONFIG_USE_LWIP + +/* LWIP Configuration */ + +/* LWIP Port Configuration */ + +/* CONFIG_LWIP_FGMAC is not set */ +#define CONFIG_LWIP_FXMAC +/* end of LWIP Port Configuration */ +#define CONFIG_LWIP_LOCAL_HOSTNAME "phytium" + +/* memory configuration */ + +/* CONFIG_LWIP_USE_MEM_POOL is not set */ +#define CONFIG_LWIP_USE_MEM_HEAP +#define CONFIG_MEM_SIZE 1 +#define CONFIG_MEM_ALIGNMENT 64 +/* end of memory configuration */ + +/* NETWORK_INTERFACE_OPTIONS */ + +/* CONFIG_LWIP_NETIF_API is not set */ +/* CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set */ +/* end of NETWORK_INTERFACE_OPTIONS */ + +/* LOOPIF */ + +#define CONFIG_LWIP_NETIF_LOOPBACK +#define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8 +/* end of LOOPIF */ + +/* SLIPIF */ + +/* CONFIG_LWIP_SLIP_SUPPORT is not set */ +/* end of SLIPIF */ + +/* Pbuf options */ + +#define CONFIG_PBUF_POOL_BUFSIZE 2 +/* end of Pbuf options */ + +/* Internal Memory Pool Sizes */ + +#define CONFIG_PBUF_POOL_SIZE 1 +/* end of Internal Memory Pool Sizes */ +#define CONFIG_LWIP_MAX_SOCKETS 10 + +/* LWIP RAW API */ + +#define CONFIG_LWIP_MAX_RAW_PCBS 16 +/* end of LWIP RAW API */ + +/* TCP */ + +#define CONFIG_LWIP_MAX_ACTIVE_TCP 16 +#define CONFIG_LWIP_MAX_LISTENING_TCP 16 +#define CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION +#define CONFIG_LWIP_TCP_MAXRTX 12 +#define CONFIG_LWIP_TCP_SYNMAXRTX 12 +#define CONFIG_LWIP_TCP_MSS 1440 +#define CONFIG_LWIP_TCP_TMR_INTERVAL 250 +#define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 +#define CONFIG_LWIP_TCP_WND_DEFAULT 5744 +#define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 +#define CONFIG_LWIP_TCP_QUEUE_OOSEQ +/* CONFIG_LWIP_TCP_SACK_OUT is not set */ +#define CONFIG_LWIP_TCP_OVERSIZE_MSS +/* CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set */ +/* CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set */ +/* end of TCP */ + +/* UDP */ + +#define CONFIG_LWIP_MAX_UDP_PCBS 16 +#define CONFIG_LWIP_UDP_RECVMBOX_SIZE 6 +/* CONFIG_LWIP_NETBUF_RECVINFO is not set */ +/* end of UDP */ + +/* IPv4 */ + +/* CONFIG_USE_IPV4_ONLY is not set */ +#define CONFIG_LWIP_IP4_REASSEMBLY +#define CONFIG_LWIP_IP4_FRAG +/* CONFIG_LWIP_IP_FORWARD is not set */ +#define CONFIG_IP_REASS_MAX_PBUFS 45 +/* end of IPv4 */ + +/* ICMP */ + +#define CONFIG_LWIP_ICMP +#define CONFIG_LWIP_MULTICAST_PING +/* CONFIG_LWIP_BROADCAST_PING is not set */ +/* end of ICMP */ + +/* DHCP */ + +/* CONFIG_LWIP_DHCP_ENABLE is not set */ +/* CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set */ +/* CONFIG_LWIP_DHCP_GET_NTP_SRV is not set */ +/* CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set */ +/* CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set */ +#define CONFIG_LWIP_DHCP_OPTIONS_LEN 68 +#define CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +/* end of DHCP */ + +/* AUTOIP */ + +/* CONFIG_LWIP_AUTOIP is not set */ +/* end of AUTOIP */ + +/* DNS */ + +#define CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES +/* end of DNS */ + +/* TCP options */ + +#define CONFIG_LWIP_TCP_RTO_TIME 1500 +/* end of TCP options */ +#define CONFIG_LWIP_TCPIP_CORE_LOCKING + +/* socket */ + +/* CONFIG_LWIP_SO_LINGER is not set */ +#define CONFIG_LWIP_SO_REUSE +#define CONFIG_LWIP_SO_REUSE_RXTOALL +/* end of socket */ +/* CONFIG_LWIP_STATS is not set */ + +/* PPP */ + +/* CONFIG_LWIP_PPP_SUPPORT is not set */ +#define CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE 3 +#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 +/* end of PPP */ + +/* Checksums */ + +/* CONFIG_LWIP_CHECKSUM_CHECK_IP is not set */ +/* CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set */ +#define CONFIG_LWIP_CHECKSUM_CHECK_ICMP +/* end of Checksums */ + +/* ipv6 */ + +#define CONFIG_LWIP_IPV6 +/* CONFIG_LWIP_IPV6_AUTOCONFIG is not set */ +#define CONFIG_LWIP_IPV6_NUM_ADDRESSES 3 +/* CONFIG_LWIP_IPV6_FORWARD is not set */ +#define CONFIG_LWIP_IP6_FRAG +#define CONFIG_LWIP_IP6_REASSEMBLY +/* end of ipv6 */ +#define CONFIG_LWIP_DEBUG +#define CONFIG_LWIP_NETIF_DEBUG +/* CONFIG_LWIP_PBUF_DEBUG is not set */ +/* CONFIG_LWIP_ETHARP_DEBUG is not set */ +/* CONFIG_LWIP_API_LIB_DEBUG is not set */ +/* CONFIG_LWIP_SOCKETS_DEBUG is not set */ +/* CONFIG_LWIP_IP_DEBUG is not set */ +/* CONFIG_LWIP_ICMP_DEBUG is not set */ +/* CONFIG_LWIP_DHCP_DEBUG is not set */ +/* CONFIG_LWIP_IP6_DEBUG is not set */ +/* CONFIG_LWIP_ICMP6_DEBUG is not set */ +/* CONFIG_LWIP_TCP_DEBUG is not set */ +/* CONFIG_LWIP_SNTP_DEBUG is not set */ +/* CONFIG_LWIP_DNS_DEBUG is not set */ +/* end of LWIP Configuration */ +#define CONFIG_USE_BACKTRACE +/* CONFIG_USE_FATFS is not set */ +/* CONFIG_USE_SFUD is not set */ +/* CONFIG_USE_SPIFFS is not set */ +/* CONFIG_USE_AMP is not set */ +#define CONFIG_USE_LETTER_SHELL + +/* Letter Shell Configuration */ + +#define CONFIG_LS_PL011_UART +#define CONFIG_DEFAULT_LETTER_SHELL_USE_UART1 +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set */ +/* CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set */ +/* end of Letter Shell Configuration */ +#define CONFIG_USE_TLSF +/* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ +/* end of FreeRTOS Setting */ + +#endif diff --git a/example/network/sockets/udp_multicast/src/Kconfig b/example/network/sockets/udp_multicast/src/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..d9d1bde0627c6c29f8ab724506a48c0ccfe055b1 --- /dev/null +++ b/example/network/sockets/udp_multicast/src/Kconfig @@ -0,0 +1,107 @@ +menu "Example Configuration" + + choice EXAMPLE_IP_MODE + prompt "Multicast IP type" + help + Example can multicast IPV4, IPV6, or both. + + config EXAMPLE_IPV4_ONLY + bool "IPV4" + select EXAMPLE_IPV4 + select USE_IPV4_ONLY + + config EXAMPLE_IPV6_ONLY + bool "IPV6" + select EXAMPLE_IPV6 + + endchoice + + config EXAMPLE_IPV4 + bool + select LWIP_ICMP + + config EXAMPLE_IPV6 + bool + select LWIP_IPV6 + + config EXAMPLE_MULTICAST_IPV4_ADDR + string "Multicast IPV4 Address (send & receive)" + default "232.10.12.10" + depends on EXAMPLE_IPV4 + help + IPV4 multicast address. Example will both send to and listen to this address. + Please use Source Specific Multicast + + config EXAMPLE_MULTICAST_IPV6_ADDR + string "Multicast IPV6 Address (send & receive)" + default "FF02::FD" + depends on EXAMPLE_IPV6 + help + IPV6 multicast address. Example will both send to and listen to this address. + + The default FF02::FD address is a link-local multicast address. + Consult IPV6 specifications or documentation for information about + meaning of different IPV6 multicast ranges. + + config EXAMPLE_PORT + int "Multicast port (send & receive)" + range 0 65535 + default 6750 + help + Multicast port the example will both send & receive UDP packets on. + + config EXAMPLE_LOOPBACK + bool "Multicast loopback" + help + Enables IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP options, meaning + that packets transmitted from the device are also received by the + device itself. + + config EXAMPLE_MULTICAST_TTL + int "Multicast packet TTL" + range 1 255 + help + Sets TTL field of multicast packets. Separate from uni- & broadcast TTL. + + choice EXAMPLE_MULTICAST_IF + prompt "Multicast Interface" + default EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF + help + Multicast socket can bind to default interface, or all interfaces. + + config EXAMPLE_MULTICAST_LISTEN_ALL_IF + bool "All interfaces (IPV4 only)" + depends on !EXAMPLE_IPV6_ONLY + + config EXAMPLE_MULTICAST_LISTEN_DEFAULT_IF + bool "Default interface" + + endchoice + +endmenu + + +menu "E2000 board Configuration" + config TARGET_NAME + string "Build Target Name" + default "eth test" + help + Build Target name for the demo + + choice EVALUATION_BOARD_TYPE + prompt "Select evaluation board" + default BOARD_TYPE_B + help + Select board type for build + config BOARD_TYPE_B + bool "evaluation board b" + config BOARD_TYPE_C + bool "evaluation board c" + config BOARD_TYPE_A + bool "evaluation board a" + config BOARD_TYPE_DEMO + bool "evaluation board demo" + endchoice # BUILD_TARGET_ARCH_TYPE + +endmenu + diff --git a/example/network/sockets/udp_multicast/src/lwip_test.c b/example/network/sockets/udp_multicast/src/lwip_test.c new file mode 100644 index 0000000000000000000000000000000000000000..5b05569e3f25ab6dd4bb0b3ed03db1de34d15c76 --- /dev/null +++ b/example/network/sockets/udp_multicast/src/lwip_test.c @@ -0,0 +1,416 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: lwip_test.c + * Date: 2022-09-15 10:24:38 + * LastEditTime: 2022-09-15 10:24:38 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + + +#include +#include +#include "strto.h" +#include "sdkconfig.h" +#include "FreeRTOS.h" +#include "task.h" +#include "ft_types.h" +#include "fpinctrl.h" +#ifndef SDK_CONFIG_H__ + #error "Please include sdkconfig.h first" +#endif + +#include "lwipopts.h" +#include "lwip_port.h" +#include "lwip/ip4_addr.h" +#include "lwip/init.h" +#include "netif/ethernet.h" +#include "ethernetif.h" +#include "lwip/netif.h" +#include "lwip/tcpip.h" +#include "../src/shell.h" + + +#if defined(CONFIG_TARGET_E2000) +#define PHY_INTERRUPTFACE_RGMII 0 +#define PHY_INTERRUPTFACE_SGMII 1 +#endif + + +#if LWIP_IPV6 +#include "lwip/ip.h" +#include "lwip/ip6_addr.h" +#else +#if LWIP_DHCP +#include "lwip/dhcp.h" +#endif +#endif + + + +user_config lwip_mac_config = {0}; + + +#if !LWIP_IPV6 +#if LWIP_DHCP +static TaskHandle_t appTaskCreateHandle = NULL; +void LwipDhcpTest(struct netif *echo_netif) +{ + int mscnt = 0; + dhcp_start(echo_netif); + printf("LwipDhcpTest is start \r\n"); + while (1) + { + vTaskDelay(DHCP_FINE_TIMER_MSECS / portTICK_RATE_MS); + dhcp_fine_tmr(); + mscnt += DHCP_FINE_TIMER_MSECS; + if (mscnt >= DHCP_COARSE_TIMER_SECS*1000) + { + dhcp_coarse_tmr(); + mscnt = 0; + } + } +} +#endif +#endif + +void LwipTestCreate(void * args) +{ + struct netif *echo_netif; + static boolean init_flag = FALSE; + BaseType_t ret = pdPASS; + /* the mac address of the board. this should be unique per board */ + unsigned char mac_ethernet_address[] = + {0x98, 0x0e, 0x24, 0x00, 0x11, 0x22}; + + echo_netif = pvPortMalloc(sizeof(struct netif)); + if(echo_netif == NULL) + { + printf("malloc netif is error \r\n"); + goto exit; + } + +#if !LWIP_IPV6 + ip_addr_t ipaddr, netmask, gw; +#if LWIP_DHCP + ipaddr.addr = 0; + gw.addr = 0; + netmask.addr = 0; +#else + /* initialize IP addresses to be used */ + IP4_ADDR(&ipaddr, 192, 168, 4, 10); + IP4_ADDR(&netmask, 255, 255, 255, 0); + IP4_ADDR(&gw, 192, 168, 4, 1); +#endif +#endif + + /* 初始化LwIP堆 */ + if(init_flag == FALSE) + { + tcpip_init(NULL, NULL); + init_flag = TRUE; + } + +#if !LWIP_IPV6 + /* Add network interface to the netif_list, and set it as default */ + if (!lwip_port_add(echo_netif, &ipaddr, &netmask, + &gw, mac_ethernet_address, + (user_config *)args)) + { + printf("Error adding N/W interface\n\r"); + return ; + } + printf("lwip_port_add is over \n\r"); +#else + /* Add network interface to the netif_list, and set it as default */ + if (!lwip_port_add(echo_netif, NULL, NULL, NULL, mac_ethernet_address, (user_config *)args)) + { + printf("Error adding N/W interface\n\r"); + return ; + } + echo_netif->ip6_autoconfig_enabled = 1; + + netif_create_ip6_linklocal_address(echo_netif, 1); + netif_ip6_addr_set_state(echo_netif, 0, IP6_ADDR_VALID); + + printf("Board IPv6 address %x:%x:%x:%x:%x:%x:%x:%x\n\r", + IP6_ADDR_BLOCK1(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK2(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK3(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK4(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK5(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK6(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK7(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK8(&echo_netif->ip6_addr[0].u_addr.ip6)); + +#endif + + netif_set_default(echo_netif); + + if (netif_is_link_up(echo_netif)) + { + /* 当netif完全配置好时,必须调用该函数 */ + netif_set_up(echo_netif); + } + else + { + /* 当netif链接关闭时,必须调用该函数 */ + netif_set_down(echo_netif); + } + + printf("neftwork setup complete\n"); + + if (xTaskCreate((TaskFunction_t )lwip_port_input_thread, + "recv_echo", + 8192, + echo_netif, + 4, + NULL) != pdPASS) + { + printf("xTaskCreate is Error %s\r\n", "recv_echo"); + FASSERT(0); + } + +#if LWIP_DHCP && LWIP_IPV4 + /* Create a new DHCP client for this interface. + * Note: you must call dhcp_fine_tmr() and dhcp_coarse_tmr() at + * the predefined regular intervals after starting the client. + */ + printf("dhcp_start...\r\n"); + + ret = xTaskCreate((TaskFunction_t )LwipDhcpTest, /* 任务入口函数 */ + (const char* )"LwipDhcpTest",/* 任务名字 */ + (uint16_t )4096, /* 任务栈大小 */ + (void* )(echo_netif),/* 任务入口函数参数 */ + (UBaseType_t )configMAX_PRIORITIES-1, /* 任务的优先级 */ + (TaskHandle_t* )&appTaskCreateHandle); /* 任务控制 */ + + if (pdPASS == ret) + { + printf("create lwip dhcp task success!\r\n"); + } + +#endif + +exit: + vTaskDelete(NULL); +} + +void LwipTest(void *args) +{ + BaseType_t ret; + ret = xTaskCreate((TaskFunction_t)LwipTestCreate, /* 任务入口函数 */ + (const char *)"LwipTestCreate", /* 任务名字 */ + (uint16_t)2048, /* 任务栈大小 */ + (void *)args, /* 任务入口函数参数 */ + (UBaseType_t)configMAX_PRIORITIES-1,/* 任务的优先级 */ + NULL); /* 任务控制块指针 */ + + FASSERT_MSG(ret == pdPASS,"LwipTestCreate Task create is failed"); + +} + + + +int FXmacPhyGpioInit(u32 instance_id,u32 interface_type) +{ +#if defined(CONFIG_TARGET_E2000Q) +#if defined(CONFIG_BOARD_TYPE_B) + if(instance_id == 3) + { + if(interface_type == PHY_INTERRUPTFACE_RGMII) + { + FPinSetConfig(FIOPAD_J37,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_0 + */ + FPinSetConfig(FIOPAD_J39,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_1 + */ + FPinSetConfig(FIOPAD_G41,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_0 + */ + FPinSetConfig(FIOPAD_E43,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_1 + */ + FPinSetConfig(FIOPAD_L43,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_tx_ctl1 */ + FPinSetConfig(FIOPAD_C43,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_2 */ + FPinSetConfig(FIOPAD_E41,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_3 */ + FPinSetConfig(FIOPAD_L45,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rx_clk1 */ + FPinSetConfig(FIOPAD_J43,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rx_ctl1 */ + FPinSetConfig(FIOPAD_J41,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_tx_clk1 */ + FPinSetDelay(FIOPAD_J41_DELAY,FPIN_OUTPUT_DELAY,FPIN_DELAY_FINE_TUNING,FPIN_DELAY_7); + FPinSetDelay(FIOPAD_J41_DELAY,FPIN_OUTPUT_DELAY,FPIN_DELAY_COARSE_TUNING,FPIN_DELAY_5); + FPinSetDelayEn(FIOPAD_J41_DELAY,FPIN_OUTPUT_DELAY,1); + + FPinSetConfig(FIOPAD_L39,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_2 */ + FPinSetConfig(FIOPAD_E37,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_3 */ + FPinSetConfig(FIOPAD_E35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac3 */ + FPinSetConfig(FIOPAD_G35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac3 */ + } + else if(interface_type == PHY_INTERRUPTFACE_SGMII) + { + FPinSetConfig(FIOPAD_E35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac3 */ + FPinSetConfig(FIOPAD_G35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac3 */ + } + else + { + printf("interface_type 0x%x is not support \r\n"); + return -1; + } + } +#elif defined(CONFIG_BOARD_TYPE_C) + if(instance_id == 1) + { + FPinSetConfig(FIOPAD_AJ53,FPIN_FUNC3,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac1 */ + FPinSetConfig(FIOPAD_AL49,FPIN_FUNC3,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac1 */ + } + else if(instance_id == 2) + { + FPinSetConfig(FIOPAD_E29,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac2 */ + FPinSetConfig(FIOPAD_G29,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac2 */ + } + else if(instance_id == 3) + { + FPinSetConfig(FIOPAD_E35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac3 */ + FPinSetConfig(FIOPAD_G35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac3 */ + } + else + { + printf("interface_type 0x%x is not support \r\n"); + return -1; + } +#endif +#elif defined(CONFIG_TARGET_E2000D) || defined(CONFIG_TARGET_E2000S) + +#if defined(CONFIG_BOARD_TYPE_B) + if(instance_id == 3) + { + if(interface_type == PHY_INTERRUPTFACE_RGMII) + { + FPinSetConfig(FIOPAD_J33,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_0 + */ + FPinSetConfig(FIOPAD_J35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_1 + */ + FPinSetConfig(FIOPAD_G37,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_0 + */ + FPinSetConfig(FIOPAD_E39,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_1 + */ + FPinSetConfig(FIOPAD_L39,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_tx_ctl1 */ + FPinSetConfig(FIOPAD_C39,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_2 */ + FPinSetConfig(FIOPAD_E37,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rxd1_3 */ + FPinSetConfig(FIOPAD_L41,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rx_clk1 */ + FPinSetConfig(FIOPAD_J39,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_rx_ctl1 */ + FPinSetConfig(FIOPAD_J37,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_tx_clk1 */ + FPinSetDelay(FIOPAD_J37_DELAY,FPIN_OUTPUT_DELAY,FPIN_DELAY_COARSE_TUNING,FPIN_DELAY_5); + FPinSetDelay(FIOPAD_J37_DELAY,FPIN_OUTPUT_DELAY,FPIN_DELAY_FINE_TUNING,FPIN_DELAY_7); + FPinSetDelayEn(FIOPAD_J37_DELAY,FPIN_OUTPUT_DELAY,1); + FPinSetConfig(FIOPAD_L35,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_2 */ + FPinSetConfig(FIOPAD_E33,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_rgmii_txd1_3 */ + FPinSetConfig(FIOPAD_E31,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac3 */ + FPinSetConfig(FIOPAD_G31,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac3 */ + } + else if(interface_type == PHY_INTERRUPTFACE_SGMII) + { + FPinSetConfig(FIOPAD_E31,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac3 */ + FPinSetConfig(FIOPAD_G31,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac3 */ + } + else + { + printf("interface_type 0x%x is not support \r\n"); + return -1; + } + } +#elif defined(CONFIG_BOARD_TYPE_C) + if(instance_id == 1) + { + FPinSetConfig(FIOPAD_AJ49,FPIN_FUNC3,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac1 */ + FPinSetConfig(FIOPAD_AL45,FPIN_FUNC3,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac1 */ + } + else if(instance_id == 2) + { + FPinSetConfig(FIOPAD_E25,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac2 */ + FPinSetConfig(FIOPAD_G25,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac2 */ + } + else if(instance_id == 3) + { + FPinSetConfig(FIOPAD_E31,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdc_mac3 */ + FPinSetConfig(FIOPAD_G31,FPIN_FUNC1,FPIN_PULL_NONE,FPIN_DRV4); /* gsd_gmu_mdio_mac3 */ + } + else + { + printf("interface_type 0x%x is not support \r\n"); + return -1; + } + +#endif + +#endif + +} + + +static int LwipDeviceSet(int argc, char *argv[]) +{ + u32 id = 0,type = 0; + + static int probe_flg = 0; + LWIP_PORT_CONFIG_DEFAULT_INIT(lwip_mac_config); + + if (!strcmp(argv[1], "probe")) + { + if(probe_flg == 1) + { + printf("The initialization of the instance is complete. Do not repeat this process \r\n") ; + return -1; + } + + switch(argc) + { + case 4: + type = (u32)simple_strtoul(argv[3], NULL, 10); + id = (u32)simple_strtoul(argv[2], NULL, 10); + break; + case 3: + id = (u32)simple_strtoul(argv[2], NULL, 10); + break; + default: + break; + } + printf("types %d\n", type); + printf("id %d\n", id); + FXmacPhyGpioInit(id,type); + lwip_mac_config.mac_instance = id; + if(type == 0) + { + lwip_mac_config.mii_interface = LWIP_PORT_INTERFACE_RGMII; + } + else + { + lwip_mac_config.mii_interface = LWIP_PORT_INTERFACE_SGMII; + } + + LwipTest(&lwip_mac_config); + probe_flg = 1; + } + else + { + printf("Please enter xmac probe \r\n") ; + printf(" -- device id is mac instance number \r\n"); + printf(" -- interface id is media independent interface , 0 is rgmii ,1 is sgmii \r\n"); + } + + return 0; +} + +SHELL_EXPORT_CMD(SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), xmac, LwipDeviceSet, Setup LWIP device test); + diff --git a/example/network/sockets/udp_multicast/src/multicast.c b/example/network/sockets/udp_multicast/src/multicast.c new file mode 100644 index 0000000000000000000000000000000000000000..e26caaf023fa759c1a20f6bda822ace4a9f80cd8 --- /dev/null +++ b/example/network/sockets/udp_multicast/src/multicast.c @@ -0,0 +1,536 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: multicast.c + * Date: 2022-09-15 10:19:11 + * LastEditTime: 2022-09-15 10:19:11 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + +#include +#include +#include "FreeRTOS.h" +#include "task.h" +#include "event_groups.h" +#include "err.h" +#include "sockets.h" +#include "sockets_ext.h" +#include "sys.h" +#include "netif.h" +#include +#include "ft_types.h" +#include "shell.h" + +#include "ft_debug.h" + +#define MULTICAST_DEBUG_TAG "MULTICAST" +#define MULTICAST_PRINT_E(format, ...) FT_DEBUG_PRINT_E(MULTICAST_DEBUG_TAG, format, ##__VA_ARGS__) +#define MULTICAST_PRINT_I(format, ...) FT_DEBUG_PRINT_I(MULTICAST_DEBUG_TAG, format, ##__VA_ARGS__) +#define MULTICAST_PRINT_D(format, ...) FT_DEBUG_PRINT_D(MULTICAST_DEBUG_TAG, format, ##__VA_ARGS__) +#define MULTICAST_PRINT_W(format, ...) FT_DEBUG_PRINT_W(MULTICAST_DEBUG_TAG, format, ##__VA_ARGS__) + + +#define IPV4_DEBUG_TAG "IPV4" +#define IPV4_PRINT_E(format, ...) FT_DEBUG_PRINT_E(IPV4_DEBUG_TAG, format, ##__VA_ARGS__) +#define IPV4_PRINT_I(format, ...) FT_DEBUG_PRINT_I(IPV4_DEBUG_TAG, format, ##__VA_ARGS__) +#define IPV4_PRINT_D(format, ...) FT_DEBUG_PRINT_D(IPV4_DEBUG_TAG, format, ##__VA_ARGS__) +#define IPV4_PRINT_W(format, ...) FT_DEBUG_PRINT_W(IPV4_DEBUG_TAG, format, ##__VA_ARGS__) + + +#define IPV6_DEBUG_TAG "IPV6" +#define IPV6_PRINT_E(format, ...) FT_DEBUG_PRINT_E(IPV6_DEBUG_TAG, format, ##__VA_ARGS__) +#define IPV6_PRINT_I(format, ...) FT_DEBUG_PRINT_I(IPV6_DEBUG_TAG, format, ##__VA_ARGS__) +#define IPV6_PRINT_D(format, ...) FT_DEBUG_PRINT_D(IPV6_DEBUG_TAG, format, ##__VA_ARGS__) +#define IPV6_PRINT_W(format, ...) FT_DEBUG_PRINT_W(IPV6_DEBUG_TAG, format, ##__VA_ARGS__) + +#define UDP_PORT CONFIG_EXAMPLE_PORT + +#if defined(CONFIG_EXAMPLE_LOOPBACK) +#define MULTICAST_LOOPBACK 1 +#else +#define MULTICAST_LOOPBACK 0 +#endif + +#define MULTICAST_TTL CONFIG_EXAMPLE_MULTICAST_TTL + +#define MULTICAST_IPV4_ADDR CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR +#define MULTICAST_IPV6_ADDR CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR + +#if defined(EXAMPLE_MULTICAST_LISTEN_ALL_IF) +#define LISTEN_ALL_IF 1 +#else +#define LISTEN_ALL_IF 0 +#endif + + + +#ifdef CONFIG_EXAMPLE_IPV4 +/* Add a socket, either IPV4-only or IPV6 dual mode, to the IPV4 + multicast group */ +static int socket_add_ipv4_multicast_group(int sock, boolean assign_source_if) +{ + struct ip_mreq imreq = { 0 }; + struct in_addr iaddr = { 0 }; + int err = 0; + /* Configure source interface */ +#if LISTEN_ALL_IF + imreq.imr_interface.s_addr = IPADDR_ANY; +#else + /* 多播输出接口的IP 地址 */ + ip_addr_t ipaddr; + + /* use default netif */ + extern struct netif *netif_default; + if(netif_default == NULL) + { + printf("default netif not set \n"); + goto err; + } + inet_addr_from_ip4addr(&iaddr, netif_ip4_addr(netif_default)); + +#endif /* LISTEN_ALL_IF */ + /* Configure multicast address to listen to */ + err = inet_aton(MULTICAST_IPV4_ADDR, &imreq.imr_multiaddr.s_addr); + if (err != 1) { + IPV4_PRINT_E("Configured IPV4 multicast address '%s' is invalid.", MULTICAST_IPV4_ADDR); + // Errors in the return value have to be negative + err = -1; + goto err; + } + MULTICAST_PRINT_I( "Configured IPV4 Multicast address %s", inet_ntoa(imreq.imr_multiaddr.s_addr)); + if (!IP_MULTICAST(ntohl(imreq.imr_multiaddr.s_addr))) { + IPV4_PRINT_W( "Configured IPV4 multicast address '%s' is not a valid multicast address. This will probably not work.", MULTICAST_IPV4_ADDR); + } + + if (assign_source_if) { + /* Assign the IPv4 multicast source interface, via its IP + (only necessary if this socket is IPV4 only) */ + err = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, &iaddr, + sizeof(struct in_addr)); + if (err < 0) { + IPV4_PRINT_E("Failed to set IP_MULTICAST_IF. Error %d", errno); + goto err; + } + } + + err = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, + &imreq, sizeof(struct ip_mreq)); + if (err < 0) { + IPV4_PRINT_E("Failed to set IP_ADD_MEMBERSHIP. Error %d", errno); + goto err; + } + + err: + return err; +} +#endif /* CONFIG_EXAMPLE_IPV4 */ + +#ifdef CONFIG_EXAMPLE_IPV6 +static int create_multicast_ipv6_socket(void) +{ + struct sockaddr_in6 saddr = { 0 }; + int netif_index; + struct in6_addr if_inaddr = { 0 }; + struct ip6_addr if_ipaddr = { 0 }; + struct ipv6_mreq v6imreq = { 0 }; + int sock = -1; + int err = 0; + + sock = socket(PF_INET6, SOCK_DGRAM, IPPROTO_IPV6); + if (sock < 0) { + IPV6_PRINT_E( "Failed to create socket. Error %d", errno); + return -1; + } + + /* Bind the socket to any address */ + saddr.sin6_family = AF_INET6; + saddr.sin6_port = htons(UDP_PORT); + bzero(&saddr.sin6_addr.un, sizeof(saddr.sin6_addr.un)); + err = bind(sock, (struct sockaddr *)&saddr, sizeof(struct sockaddr_in6)); + if (err < 0) { + IPV6_PRINT_E( "Failed to bind socket. Error %d", errno); + goto err; + } + + /* Selct the interface to use as multicast source for this socket. */ +#if LISTEN_ALL_IF + bzero(&if_inaddr.un, sizeof(if_inaddr.un)); +#else + char addrbuf[32] = { 0 }; + /* Read interface adapter link-local address and use it + to bind the multicast IF to this socket.*/ + + extern struct netif *netif_default; + if(netif_default == NULL) + { + printf("default netif not set \n"); + goto err; + } + + memcpy(&if_ipaddr, &netif_default->ip6_addr[0], sizeof(ip6_addr_t)); + + inet6_addr_from_ip6addr(&if_inaddr, &if_ipaddr); + inet6_ntoa_r(if_inaddr, addrbuf, sizeof(addrbuf)-1); + printf("addrbuf is %s \r\n",addrbuf); +#endif /* LISTEN_ALL_IF */ + + /* search for netif index */ + netif_index = netif_get_index(netif_default); + if(netif_index < 0) { + IPV6_PRINT_E( "Failed to get netif index"); + goto err; + } + + /* Assign the multicast source interface, via its IP */ + err = setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_IF, &netif_index,sizeof(uint8_t)); + if (err < 0) { + IPV6_PRINT_E( "Failed to set IPV6_MULTICAST_IF. Error %d", errno); + goto err; + } + + /* Assign multicast TTL (set separately from normal interface TTL) */ + uint8_t ttl = MULTICAST_TTL; + setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &ttl, sizeof(uint8_t)); + if (err < 0) { + IPV6_PRINT_E( "Failed to set IPV6_MULTICAST_HOPS. Error %d", errno); + goto err; + } + +#if MULTICAST_LOOPBACK + /* select whether multicast traffic should be received by this device, too + (if setsockopt() is not called, the default is no) */ + uint8_t loopback_val = MULTICAST_LOOPBACK; + err = setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, + &loopback_val, sizeof(uint8_t)); + if (err < 0) { + IPV6_PRINT_E( "Failed to set IPV6_MULTICAST_LOOP. Error %d", errno); + goto err; + } +#endif + + /* this is also a listening socket, so add it to the multicast */ + /* group for listening... */ +#ifdef CONFIG_EXAMPLE_IPV6 + /* Configure multicast address to listen to */ + err = inet6_aton(MULTICAST_IPV6_ADDR, &v6imreq.ipv6mr_multiaddr); + if (err != 1) { + IPV6_PRINT_E( "Configured IPV6 multicast address '%s' is invalid.", MULTICAST_IPV6_ADDR); + goto err; + } + MULTICAST_PRINT_I( "Configured IPV6 Multicast address %s", inet6_ntoa(v6imreq.ipv6mr_multiaddr)); + ip6_addr_t multi_addr; + inet6_addr_to_ip6addr(&multi_addr, &v6imreq.ipv6mr_multiaddr); + if (!ip6_addr_ismulticast(&multi_addr)) { + MULTICAST_PRINT_W( "Configured IPV6 multicast address '%s' is not a valid multicast address. This will probably not work.", MULTICAST_IPV6_ADDR); + } + /* Configure source interface */ + v6imreq.ipv6mr_interface = (unsigned int)netif_index; + err = setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, + &v6imreq, sizeof(struct ipv6_mreq)); + if (err < 0) { + IPV6_PRINT_E( "Failed to set IPV6_ADD_MEMBERSHIP. Error %d", errno); + goto err; + } +#endif + + int only = 1; /* IPV6-only socket */ + + err = setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &only, sizeof(int)); + if (err < 0) { + IPV6_PRINT_E( "Failed to set IPV6_V6ONLY. Error %d", errno); + goto err; + } + MULTICAST_PRINT_I( "Socket set IPV6-only"); + + /* All set, socket is configured for sending and receiving */ + return sock; + +err: + close(sock); + return -1; +} +#endif + +#ifdef CONFIG_EXAMPLE_IPV4_ONLY +static int create_multicast_ipv4_socket(void) +{ + struct sockaddr_in saddr = { 0 }; + int sock = -1; + int err = 0; + + sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); + if (sock < 0) { + IPV4_PRINT_E("Failed to create socket. Error %d", errno); + return -1; + } + + /* Bind the socket to any address */ + saddr.sin_family = PF_INET; + saddr.sin_port = htons(UDP_PORT); + saddr.sin_addr.s_addr = htonl(INADDR_ANY); + err = bind(sock, (struct sockaddr *)&saddr, sizeof(struct sockaddr_in)); + if (err < 0) { + IPV4_PRINT_E("Failed to bind socket. Error %d", errno); + goto err; + } + + + /* Assign multicast TTL (set separately from normal interface TTL) */ + uint8_t ttl = MULTICAST_TTL; + setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(uint8_t)); + if (err < 0) { + IPV4_PRINT_E("Failed to set IP_MULTICAST_TTL. Error %d", errno); + goto err; + } + +#if MULTICAST_LOOPBACK + /* select whether multicast traffic should be received by this device, too */ + /* (if setsockopt() is not called, the default is no) */ + uint8_t loopback_val = MULTICAST_LOOPBACK; + err = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, + &loopback_val, sizeof(uint8_t)); + if (err < 0) { + IPV4_PRINT_E("Failed to set IP_MULTICAST_LOOP. Error %d", errno); + goto err; + } +#endif + + /* this is also a listening socket, so add it to the multicast + group for listening... */ + err = socket_add_ipv4_multicast_group(sock, TRUE); + if (err < 0) { + goto err; + } + + /* All set, socket is configured for sending and receiving */ + return sock; + +err: + close(sock); + return -1; +} +#endif /* CONFIG_EXAMPLE_IPV4_ONLY */ + +static void MulticastExampleTask(void *pvParameters) +{ + while (1) { + int sock; + +#ifdef CONFIG_EXAMPLE_IPV4_ONLY + sock = create_multicast_ipv4_socket(); + if (sock < 0) { + MULTICAST_PRINT_E( "Failed to create IPv4 multicast socket"); + } +#else + sock = create_multicast_ipv6_socket(); + if (sock < 0) { + MULTICAST_PRINT_E( "Failed to create IPv6 multicast socket"); + } +#endif + + if (sock < 0) { + vTaskDelay(5 / portTICK_PERIOD_MS); + continue; + } + +#ifdef CONFIG_EXAMPLE_IPV4 + /* set destination multicast addresses for sending from these sockets */ + struct sockaddr_in sdestv4 = { + .sin_family = PF_INET, + .sin_port = htons(UDP_PORT), + }; + /* We know this inet_aton will pass because we did it above already */ + inet_aton(MULTICAST_IPV4_ADDR, &sdestv4.sin_addr.s_addr); +#endif + +#ifdef CONFIG_EXAMPLE_IPV6 + struct sockaddr_in6 sdestv6 = { + .sin6_family = PF_INET6, + .sin6_port = htons(UDP_PORT), + }; + /* We know this inet_aton will pass because we did it above already */ + inet6_aton(MULTICAST_IPV6_ADDR, &sdestv6.sin6_addr); +#endif + + /* Loop waiting for UDP received, and sending UDP packets if we don't + see any. */ + int err = 1; + while (err > 0) { + struct timeval tv = { + .tv_sec = 2, + .tv_usec = 0, + }; + fd_set rfds; + FD_ZERO(&rfds); + FD_SET(sock, &rfds); + /* 等待数据接收事件 */ + int s = select(sock + 1, &rfds, NULL, NULL, &tv); + if (s < 0) { + MULTICAST_PRINT_E( "Select failed: errno %d", errno); + err = -1; + break; + } + else if (s > 0) { + if (FD_ISSET(sock, &rfds)) { + /* Incoming datagram received */ + char recvbuf[48]; + char raddr_name[32] = { 0 }; + + struct sockaddr_storage raddr; /* Large enough for both IPv4 or IPv6 */ + socklen_t socklen = sizeof(raddr); + int len = recvfrom(sock, recvbuf, sizeof(recvbuf)-1, 0, + (struct sockaddr *)&raddr, &socklen); + if (len < 0) { + MULTICAST_PRINT_E( "multicast recvfrom failed: errno %d", errno); + err = -1; + break; + } + + /* Get the sender's address as a string */ +#ifdef CONFIG_EXAMPLE_IPV4 + if (raddr.ss_family == PF_INET) { + inet_ntoa_r(((struct sockaddr_in *)&raddr)->sin_addr, + raddr_name, sizeof(raddr_name)-1); + } +#endif +#ifdef CONFIG_EXAMPLE_IPV6 + if (raddr.ss_family== PF_INET6) { + inet6_ntoa_r(((struct sockaddr_in6 *)&raddr)->sin6_addr, raddr_name, sizeof(raddr_name)-1); + } +#endif + MULTICAST_PRINT_I( "received %d bytes from %s:", len, raddr_name); + + recvbuf[len] = 0; /* Null-terminate whatever we received and treat like a string... */ + MULTICAST_PRINT_I( "%s", recvbuf); + } + } + else { /* s == 0 */ + /* Timeout passed with no incoming data, so send something! */ + static int send_count; + const char sendfmt[] = "Multicast #%d sent by Phytium\n"; + char sendbuf[48]; + char addrbuf[32] = { 0 }; + size_t len = snprintf(sendbuf, sizeof(sendbuf), sendfmt, send_count++); + if (len > sizeof(sendbuf)) { + MULTICAST_PRINT_E( "Overflowed multicast sendfmt buffer!!"); + send_count = 0; + err = -1; + break; + } + + struct addrinfo hints = { + .ai_flags = AI_PASSIVE, + .ai_socktype = SOCK_DGRAM, + }; + struct addrinfo *res; + +#ifdef CONFIG_EXAMPLE_IPV4 /* Send an IPv4 multicast packet */ + +#ifdef CONFIG_EXAMPLE_IPV4_ONLY + hints.ai_family = AF_INET; /* For an IPv4 socket */ +#endif + int err = getaddrinfo(CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR, + NULL, + &hints, + &res); + if (err < 0) { + MULTICAST_PRINT_E( "getaddrinfo() failed for IPV4 destination address. error: %d", err); + break; + } + if (res == 0) { + MULTICAST_PRINT_E( "getaddrinfo() did not return any addresses"); + break; + } +#ifdef CONFIG_EXAMPLE_IPV4_ONLY + ((struct sockaddr_in *)res->ai_addr)->sin_port = htons(UDP_PORT); + inet_ntoa_r(((struct sockaddr_in *)res->ai_addr)->sin_addr, addrbuf, sizeof(addrbuf)-1); + MULTICAST_PRINT_I( "Sending to IPV4 multicast address %s:%d...", addrbuf, UDP_PORT); +#else + ((struct sockaddr_in6 *)res->ai_addr)->sin6_port = htons(UDP_PORT); + inet6_ntoa_r(((struct sockaddr_in6 *)res->ai_addr)->sin6_addr, addrbuf, sizeof(addrbuf)-1); + MULTICAST_PRINT_I( "Sending to IPV6 (V4 mapped) multicast address %s port %d (%s)...", addrbuf, UDP_PORT, CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR); +#endif + err = sendto(sock, sendbuf, len, 0, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); + if (err < 0) { + MULTICAST_PRINT_E( "IPV4 sendto failed. errno: %d", errno); + break; + } +#endif +#ifdef CONFIG_EXAMPLE_IPV6 + hints.ai_family = AF_INET6; + hints.ai_protocol = 0; + err = getaddrinfo(CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR, + NULL, + &hints, + &res); + if (err < 0) { + MULTICAST_PRINT_E( "getaddrinfo() failed for IPV6 destination address. error: %d", err); + break; + } + + struct sockaddr_in6 *s6addr = (struct sockaddr_in6 *)res->ai_addr; + s6addr->sin6_port = htons(UDP_PORT); + inet6_ntoa_r(s6addr->sin6_addr, addrbuf, sizeof(addrbuf)-1); + MULTICAST_PRINT_I( "Sending to IPV6 multicast address %s port %d...", addrbuf, UDP_PORT); + err = sendto(sock, sendbuf, len, 0, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); + if (err < 0) { + MULTICAST_PRINT_E( "IPV6 sendto failed. errno: %d", errno); + break; + } +#endif + } + } + + MULTICAST_PRINT_E( "Shutting down socket and restarting..."); + shutdown(sock, 0); + close(sock); + } + +} + + +static int MulticastMain(int argc, char *argv[]) +{ + static int create_flg = 0; + BaseType_t task_ret; + if(create_flg == 0) + { + create_flg++; + } + else + { + MULTICAST_PRINT_E( "The multicast task has been created. Do not create it again "); + return -1; + } + + /* step 1: Create multicast task */ + task_ret = xTaskCreate(&MulticastExampleTask, "mcast_task", 4096, NULL, 5, NULL); + + if(task_ret != pdPASS) + { + create_flg = 0; + MULTICAST_PRINT_E("Failed to create multicast task "); + return -1; + } + + return 0; +} + +SHELL_EXPORT_CMD(SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), multicast, MulticastMain, Testing multicast functions based on UDP); + diff --git a/example/network/sockets/udp_multicast/test/makefile b/example/network/sockets/udp_multicast/test/makefile new file mode 100644 index 0000000000000000000000000000000000000000..6762ebe09408655e19ff8873800e3f55499aed6c --- /dev/null +++ b/example/network/sockets/udp_multicast/test/makefile @@ -0,0 +1,24 @@ + + + +all: + gcc multicast_server_ipv4.c -o multicast_server_ipv4.out + gcc multicast_server_ipv6.c -o multicast_server_ipv6.out + cp multicast_server_ipv4.out ../ + cp multicast_server_ipv6.out ../ + + + +.PHONY: clean + +RM_FILES = $(foreach file,$(1),rm -f $(file)$(EOL)) + +clean: + $(call RM_DIRS,$(OUTPUT_DIR)) + $(call RM_FILES,*.elf) + $(call RM_FILES,*.bin) + $(call RM_FILES,*.dis) + $(call RM_FILES,*.map) + $(call RM_FILES,*.tar.gz) + $(call RM_FILES,*.asm) + $(call RM_FILES,*.out) diff --git a/example/network/sockets/udp_multicast/test/multicast_server_ipv4.c b/example/network/sockets/udp_multicast/test/multicast_server_ipv4.c new file mode 100644 index 0000000000000000000000000000000000000000..5357787f3fad741b5d1d2a672905855325ccb624 --- /dev/null +++ b/example/network/sockets/udp_multicast/test/multicast_server_ipv4.c @@ -0,0 +1,101 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: multicast_server_ipv4.c + * Date: 2022-09-16 09:15:47 + * LastEditTime: 2022-09-16 09:15:47 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + +#include +#include +#include +#include +#include +#include +#include +#include "../sdkconfig.h" + + + +#if defined(CONFIG_EXAMPLE_IPV4_ONLY) + +#define GROUP_IP CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR +#define TEST_PORT CONFIG_EXAMPLE_PORT + + +int main() +{ + // 1. 创建通信的套接字 + int fd = socket(AF_INET, SOCK_DGRAM, 0); + if(fd == -1) + { + perror("socket"); + exit(0); + } + printf("addr is %s \r\n",GROUP_IP); + printf("TEST_PORT is %d \r\n",TEST_PORT); + // 2. 通信的套接字和本地的IP与端口绑定 + struct sockaddr_in addr; + addr.sin_family = AF_INET; + addr.sin_port = htons(TEST_PORT); // 大端 + addr.sin_addr.s_addr = htonl(INADDR_ANY); // 0.0.0.0 + int ret = bind(fd, (struct sockaddr*)&addr, sizeof(addr)); + if(ret == -1) + { + perror("bind"); + exit(0); + } + printf("加入到多播组 \r\n"); + // 3. 加入到多播组 + struct ip_mreq mreq; // 多播地址结构体 + mreq.imr_multiaddr.s_addr=inet_addr(GROUP_IP); + mreq.imr_interface.s_addr = htonl(INADDR_ANY); + ret=setsockopt(fd,IPPROTO_IP,IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq)); + + char buf[1024]; + char sendaddrbuf[64]; + socklen_t len = sizeof(struct sockaddr_in); + struct sockaddr_in sendaddr; + printf("通信 \r\n"); + // 3. 通信 + while(1) + { + // 接收广播消息 + memset(buf, 0, sizeof(buf)); + // 阻塞等待数据达到 + + recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *)&sendaddr, &len); + printf("sendaddr:%s, port:%d\n", inet_ntop(AF_INET, &sendaddr.sin_addr.s_addr, sendaddrbuf, sizeof(sendaddrbuf)), sendaddr.sin_port); + printf("接收到的组播消息: %s\n", buf); + sendto(fd, buf, strlen(buf)+1, 0, (struct sockaddr *)&sendaddr, len); + } + close(fd); + return 0; +} + +#else + + +int main() +{ + printf("The test program does not support ipv4 \n"); + return 0; +} + + +#endif diff --git a/example/network/sockets/udp_multicast/test/multicast_server_ipv6.c b/example/network/sockets/udp_multicast/test/multicast_server_ipv6.c new file mode 100644 index 0000000000000000000000000000000000000000..6f474dcfc1d7c9240de3eecd78b901b529bfeb64 --- /dev/null +++ b/example/network/sockets/udp_multicast/test/multicast_server_ipv6.c @@ -0,0 +1,80 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: multicast_server_ipv6.c + * Date: 2022-09-23 14:28:25 + * LastEditTime: 2022-09-23 14:28:25 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + + +#include +#include +#include +#include +#include +#include "../sdkconfig.h" + +#if defined(CONFIG_EXAMPLE_IPV6_ONLY) + +int main() +{ + //创建套接字 + int fd = socket(AF_INET6, SOCK_DGRAM, 0); + printf("multicast address is %s ,port is %d \r\n",CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR,CONFIG_EXAMPLE_PORT); + //绑定本地网络信息 + struct sockaddr_in6 address = {AF_INET6, htons(CONFIG_EXAMPLE_PORT)}; + bind(fd, (struct sockaddr*)&address, sizeof address); + + //ipv6_mreq结构提供了用于IPv6地址的多播组的信息。 + struct ipv6_mreq group; + //将接口索引指定为0,则使用默认的多播接口。 + group.ipv6mr_interface = 0; + //IPv6组播组的地址。 + inet_pton(AF_INET6, CONFIG_EXAMPLE_MULTICAST_IPV6_ADDR, &group.ipv6mr_multiaddr); + //将套接字加入到指定接口上提供的多播组。此选项仅对数据报和原始套接字有效(套接字类>型必须为SOCK_DGRAM或SOCK_RAW)。 + setsockopt(fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &group, sizeof(group)); + + char buf[1024]; + char sendaddrbuf[64]; + socklen_t len = sizeof(struct sockaddr_in); + struct sockaddr_in sendaddr; + // 3. 通信 + while(1) + { + // 接收广播消息 + memset(buf, 0, sizeof(buf)); + // 阻塞等待数据达到 + recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *)&sendaddr, &len); + printf("sendaddr:%s, port:%d\n", inet_ntop(AF_INET6, &sendaddr.sin_addr.s_addr, sendaddrbuf, sizeof(sendaddrbuf)), sendaddr.sin_port); + printf("接收到的组播消息: %s\n", buf); + sendto(fd, buf, strlen(buf)+1, 0, (struct sockaddr *)&sendaddr, len); + } + close(fd); + return 0; + +} + +#else + +int main() +{ + printf("The test program does not support ipv6 \n"); + return 0; +} + +#endif diff --git a/example/network/xmac_lwip_test/Kconfig b/example/network/xmac_lwip_test/Kconfig index 963bb1bda65793c369c951ab163ad311364423aa..8e44e63b2cf553fbd61647c9ae7e786b724646c5 100644 --- a/example/network/xmac_lwip_test/Kconfig +++ b/example/network/xmac_lwip_test/Kconfig @@ -8,35 +8,6 @@ mainmenu "Phytium FreeRTOS Configuration" help Build Target name for the demo - choice - prompt "choice lwip config" - default LWIP_IPV4_TEST - config LWIP_IPV4_TEST - bool "test lwip ipv4" - config LWIP_IPV4_DHCP_TEST - bool "test lwip ipv4 and dhcp" - config LWIP_IPV6_TEST - bool "test lwip ipv6" - endchoice - - config GMAC_RX_DESCNUM - int "receive description number" - default "16" - help - receive description number for the demo - - config GMAC_TX_DESCNUM - int "transmit description number" - default "16" - help - transmit description number for the demo - - config GMAC_IRQ_PRIORITY - int "gmac irq priority, 0~15" - default "12" - help - gmac irq priority for the demo - if TARGET_E2000 source "./src/Kconfig" endif diff --git a/example/network/xmac_lwip_test/README.md b/example/network/xmac_lwip_test/README.md index 5f031c46d995803b6088aa62ef316953192b6381..6de8488711c4708a3fc09978c6809c2dd23d56a8 100644 --- a/example/network/xmac_lwip_test/README.md +++ b/example/network/xmac_lwip_test/README.md @@ -39,11 +39,12 @@ 本例程支持的硬件平台包括 -- E2000D +- E2000D/Q 对应的配置项是, - CONFIG_TARGET_E2000D +- CONFIG_TARGET_E2000Q ### 2.2 SDK配置方法 @@ -62,6 +63,8 @@ - make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址 - make load_e2000d_aarch64 将预设64bit e2000d 下的配置加载至工程中 - make load_e2000d_aarch32 将预设32bit e2000d 下的配置加载至工程中 +- make load_e2000q_aarch64 将预设64bit e2000q 下的配置加载至工程中 +- make load_e2000q_aarch32 将预设32bit e2000q 下的配置加载至工程中 - make menuconfig 配置目录下的参数变量 - make backup_kconfig 将目录下的sdkconfig 备份到./configs下 @@ -137,7 +140,7 @@ xmac probe [device id] [interface id] - 其中device id 为控制器id - interface id ,0 为rgmii ,1 为sgmii -![xmac_probe_ipv4](./pic/xmac_probe_ipv4.png "xmac_probe_ipv4.png") +![xmac_probe_ipv4](./pic/xmac_probe.png "xmac_probe.png") ![ping](./pic/ping.png "ping.png") @@ -145,6 +148,12 @@ xmac probe [device id] [interface id] #### 2.4.2 ipv6下的probe +- 先将配置恢复到初始配置状态,以E2000D 为例 + +```shell + make load_e2000d_aarch32 +``` + - 输入以下命令 ``` @@ -164,13 +173,19 @@ xmac probe [device id] [interface id] - 其中device id 为控制器id - interface id ,0 为rgmii ,1 为sgmii -![gmac_probe](./pic/gmac_probe_ipv6.png "gmac_probe_ipv6.png") +![xmac_probe](./pic/xmac_probe.png "xmac_probe.png") ![ping](./pic/ping_ipv6.png "ping_ipv6.png") #### 2.4.3 ipv4 dhcp +- 先将配置恢复到初始配置状态,以E2000D 为例 + +```shell + make load_e2000d_aarch32 +``` + - 输入以下命令 ``` @@ -179,7 +194,6 @@ make menuconfig - 将此项选择上 - ![dhcp_select](./pic/xmac_dhcp_menuconfig.png) - 输入以下命令,初始化LWIP网络协议栈, 并且会默认打开dhcp 线程 @@ -191,7 +205,7 @@ xmac probe [device id] [interface id] - 其中device id 为控制器id - interface id ,0 为rgmii ,1 为sgmii -![xmac_probe_dhcp0](./pic/xmac_probe_dhcp0.png "xmac_probe_dhcp0.png") +![xmac_probe_dhcp0](./pic/xmac_probe.png "xmac_probe.png") ![xmac_probe_dhcp1](./pic/xmac_probe_dhcp1.png "xmac_probe_dhcp1.png") @@ -207,6 +221,27 @@ Q: 程序运行过程中ping大包异常 A: 考虑以下两个宏的大小:PBUF_POOL_SIZE定义缓冲池的个数,PBUF_POOL_BUFSIZE定义单个缓冲区的大小 +Q: 如何选择demo板的配置 + +A: 开发者在编译终端下使用以下命令 +```shell + make menuconfig +``` + +![](./pic/select_demo.png) + + +Q: 如果开发者使用E2000 demo板应该如何进行实验: + +A: 开发者在串口终端上输入以下命令对控制器进行初始化 + +![](./pic/e2000demo板全貌.jpg) + + +```shell + xmac probe 0 1 +``` + ## 4. 修改历史记录 v0.2.0 重构lwip diff --git a/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs b/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs index 643d20f1bf604228ec4a507ebd4006d0466583a1..c11555f1df43eacd2383ebb7c837d2b7215c5a25 100644 --- a/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs +++ b/example/network/xmac_lwip_test/configs/e2000d_aarch32_eg_configs @@ -2,20 +2,18 @@ # # Project Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a32" -CONFIG_LWIP_IPV4_TEST=y -# CONFIG_LWIP_IPV4_DHCP_TEST is not set -# CONFIG_LWIP_IPV6_TEST is not set -CONFIG_GMAC_RX_DESCNUM=256 -CONFIG_GMAC_TX_DESCNUM=256 -CONFIG_GMAC_IRQ_PRIORITY=12 +CONFIG_TARGET_NAME="e2000d_lwip_echo" # # E2000 board Configuration # -CONFIG_BOARD_TYPE_B=y +CONFIG_LWIP_IPV4_TEST=y +# CONFIG_LWIP_IPV4_DHCP_TEST is not set +# CONFIG_LWIP_IPV6_TEST is not set +# CONFIG_BOARD_TYPE_B is not set # CONFIG_BOARD_TYPE_C is not set # CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y # end of E2000 board Configuration # end of Project Configuration @@ -118,10 +116,10 @@ CONFIG_AARCH32_RAM_LD=y # CONFIG_AARCH64_RAM_LD is not set # CONFIG_USER_DEFINED_LD is not set CONFIG_LINK_SCRIPT_ROM=y -CONFIG_ROM_START_UP_ADDR=0x90000000 +CONFIG_ROM_START_UP_ADDR=0x80100000 CONFIG_ROM_SIZE_MB=1 CONFIG_LINK_SCRIPT_RAM=y -CONFIG_RAM_START_UP_ADDR=0x90500000 +CONFIG_RAM_START_UP_ADDR=0x80500000 CONFIG_RAM_SIZE_MB=64 CONFIG_HEAP_SIZE=1 CONFIG_SVC_STACK_SIZE=0x1000 @@ -219,8 +217,195 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# # CONFIG_LWIP_FGMAC is not set CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING=y +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -241,4 +426,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs b/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs index 067dff9fafc2b511a6b03afbdbe39a04fa436426..31ac52cbc6d0513a5fbcf778956ff1aca3154ae8 100644 --- a/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs +++ b/example/network/xmac_lwip_test/configs/e2000d_aarch64_eg_configs @@ -2,20 +2,18 @@ # # Project Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a64" -CONFIG_LWIP_IPV4_TEST=y -# CONFIG_LWIP_IPV4_DHCP_TEST is not set -# CONFIG_LWIP_IPV6_TEST is not set -CONFIG_GMAC_RX_DESCNUM=256 -CONFIG_GMAC_TX_DESCNUM=256 -CONFIG_GMAC_IRQ_PRIORITY=12 +CONFIG_TARGET_NAME="e2000d_freertos_a32" # # E2000 board Configuration # -CONFIG_BOARD_TYPE_B=y +CONFIG_LWIP_IPV4_TEST=y +# CONFIG_LWIP_IPV4_DHCP_TEST is not set +# CONFIG_LWIP_IPV6_TEST is not set +# CONFIG_BOARD_TYPE_B is not set # CONFIG_BOARD_TYPE_C is not set # CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y # end of E2000 board Configuration # end of Project Configuration @@ -99,10 +97,10 @@ CONFIG_USE_NEW_LIBC=y # # Building Option # -CONFIG_LOG_VERBOS=y +# CONFIG_LOG_VERBOS is not set # CONFIG_LOG_DEBUG is not set # CONFIG_LOG_INFO is not set -# CONFIG_LOG_WARN is not set +CONFIG_LOG_WARN=y # CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y @@ -118,13 +116,13 @@ CONFIG_INTERRUPT_ROLE_MASTER=y CONFIG_AARCH64_RAM_LD=y # CONFIG_USER_DEFINED_LD is not set CONFIG_LINK_SCRIPT_ROM=y -CONFIG_ROM_START_UP_ADDR=0x90000000 +CONFIG_ROM_START_UP_ADDR=0x80100000 CONFIG_ROM_SIZE_MB=1 CONFIG_LINK_SCRIPT_RAM=y -CONFIG_RAM_START_UP_ADDR=0x90500000 +CONFIG_RAM_START_UP_ADDR=0x80500000 CONFIG_RAM_SIZE_MB=64 CONFIG_HEAP_SIZE=1 -CONFIG_STACK_SIZE=0x1000 +CONFIG_STACK_SIZE=0x100000 CONFIG_FPU_STACK_SIZE=0x1000 # end of Linker Options @@ -215,8 +213,195 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# # CONFIG_LWIP_FGMAC is not set CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING=y +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -237,4 +422,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs b/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..04aefcdc045fb2a23782d7edd7beb862c0bc3893 --- /dev/null +++ b/example/network/xmac_lwip_test/configs/e2000q_aarch32_eg_configs @@ -0,0 +1,430 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000d_lwip_echo" + +# +# E2000 board Configuration +# +CONFIG_LWIP_IPV4_TEST=y +# CONFIG_LWIP_IPV4_DHCP_TEST is not set +# CONFIG_LWIP_IPV6_TEST is not set +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +CONFIG_TARGET_ARMV8_AARCH32=y +# CONFIG_TARGET_ARMV8_AARCH64 is not set +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +CONFIG_USE_AARCH64_L1_TO_AARCH32=y +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +CONFIG_LOG_WARN=y +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +CONFIG_AARCH32_RAM_LD=y +# CONFIG_AARCH64_RAM_LD is not set +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_SVC_STACK_SIZE=0x1000 +CONFIG_SYS_STACK_SIZE=0x1000 +CONFIG_IRQ_STACK_SIZE=0x1000 +CONFIG_ABORT_STACK_SIZE=0x1000 +CONFIG_FIQ_STACK_SIZE=0x1000 +CONFIG_UNDEF_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING=y +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git a/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs b/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs new file mode 100644 index 0000000000000000000000000000000000000000..9ee6c5008e326b2075a1eebac6ecb39c42005d05 --- /dev/null +++ b/example/network/xmac_lwip_test/configs/e2000q_aarch64_eg_configs @@ -0,0 +1,426 @@ + +# +# Project Configuration +# +CONFIG_TARGET_NAME="e2000d_lwip_echo" + +# +# E2000 board Configuration +# +CONFIG_LWIP_IPV4_TEST=y +# CONFIG_LWIP_IPV4_DHCP_TEST is not set +# CONFIG_LWIP_IPV6_TEST is not set +# CONFIG_BOARD_TYPE_B is not set +# CONFIG_BOARD_TYPE_C is not set +# CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y +# end of E2000 board Configuration +# end of Project Configuration + +# +# Standalone Setting +# +CONFIG_USE_FREERTOS=y + +# +# Arch Configuration +# +# CONFIG_TARGET_ARMV8_AARCH32 is not set +CONFIG_TARGET_ARMV8_AARCH64=y +CONFIG_USE_CACHE=y +CONFIG_USE_MMU=y +CONFIG_USE_SYS_TICK=y +# CONFIG_MMU_DEBUG_PRINTS is not set +# end of Arch Configuration + +# +# Board Configuration +# +# CONFIG_TARGET_F2000_4 is not set +# CONFIG_TARGET_D2000 is not set +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set +# CONFIG_TARGET_E2000S is not set +CONFIG_TARGET_E2000=y +CONFIG_DEFAULT_DEBUG_PRINT_UART1=y +# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set +# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set +# end of Board Configuration + +# +# Components Configuration +# +# CONFIG_USE_SPI is not set +# CONFIG_USE_QSPI is not set +CONFIG_USE_GIC=y +CONFIG_ENABLE_GICV3=y +CONFIG_USE_SERIAL=y + +# +# Usart Configuration +# +CONFIG_ENABLE_Pl011_UART=y +# end of Usart Configuration + +# CONFIG_USE_GPIO is not set +CONFIG_USE_ETH=y + +# +# Eth Configuration +# +CONFIG_ENABLE_FXMAC=y +# CONFIG_ENABLE_FGMAC is not set +CONFIG_FXMAC_PHY_COMMON=y +# CONFIG_FXMAC_PHY_YT is not set +# end of Eth Configuration + +# CONFIG_USE_CAN is not set +# CONFIG_USE_I2C is not set +# CONFIG_USE_TIMER is not set +# CONFIG_USE_MIO is not set +# CONFIG_USE_SDMMC is not set +# CONFIG_USE_PCIE is not set +# CONFIG_USE_WDT is not set +# CONFIG_USE_DMA is not set +# CONFIG_USE_NAND is not set +# CONFIG_USE_RTC is not set +# CONFIG_USE_SATA is not set +# CONFIG_USE_USB is not set +# CONFIG_USE_ADC is not set +# CONFIG_USE_PWM is not set +# CONFIG_USE_IPC is not set +# end of Components Configuration + +CONFIG_USE_NEW_LIBC=y +# end of Standalone Setting + +# +# Building Option +# +# CONFIG_LOG_VERBOS is not set +# CONFIG_LOG_DEBUG is not set +# CONFIG_LOG_INFO is not set +CONFIG_LOG_WARN=y +# CONFIG_LOG_ERROR is not set +# CONFIG_LOG_NONE is not set +CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y +CONFIG_INTERRUPT_ROLE_MASTER=y +# CONFIG_INTERRUPT_ROLE_SLAVE is not set +# CONFIG_LOG_EXTRA_INFO is not set +# CONFIG_BOOTUP_DEBUG_PRINTS is not set + +# +# Linker Options +# +# CONFIG_AARCH32_RAM_LD is not set +CONFIG_AARCH64_RAM_LD=y +# CONFIG_USER_DEFINED_LD is not set +CONFIG_LINK_SCRIPT_ROM=y +CONFIG_ROM_START_UP_ADDR=0x80100000 +CONFIG_ROM_SIZE_MB=1 +CONFIG_LINK_SCRIPT_RAM=y +CONFIG_RAM_START_UP_ADDR=0x80500000 +CONFIG_RAM_SIZE_MB=64 +CONFIG_HEAP_SIZE=1 +CONFIG_STACK_SIZE=0x100000 +CONFIG_FPU_STACK_SIZE=0x1000 +# end of Linker Options + +# +# Compiler Options +# +CONFIG_OUTPUT_BINARY=y +# end of Compiler Options +# end of Building Option + +# +# Component Configuration +# + +# +# Freertos Uart Drivers +# +CONFIG_FREERTOS_USE_UART=y +# end of Freertos Uart Drivers + +# +# Freertos Pwm Drivers +# +# CONFIG_FREERTOS_USE_PWM is not set +# end of Freertos Pwm Drivers + +# +# Freertos Qspi Drivers +# +# CONFIG_FREERTOS_USE_QSPI is not set +# end of Freertos Qspi Drivers + +# +# Freertos Wdt Drivers +# +# CONFIG_FREERTOS_USE_WDT is not set +# end of Freertos Wdt Drivers + +# +# Freertos Eth Drivers +# +CONFIG_FREERTOS_USE_XMAC=y +# end of Freertos Eth Drivers + +# +# Freertos Gpio Drivers +# +# CONFIG_FREERTOS_USE_GPIO is not set +# end of Freertos Gpio Drivers + +# +# Freertos Spim Drivers +# +# CONFIG_FREERTOS_USE_FSPIM is not set +# end of Freertos Spim Drivers + +# +# Freertos DMA Drivers +# +# CONFIG_FREERTOS_USE_FDDMA is not set +# CONFIG_FREERTOS_USE_FGDMA is not set +# end of Freertos DMA Drivers + +# +# Freertos MMC Drivers +# +# CONFIG_FREERTOS_USE_FSDIO is not set +# end of Freertos MMC Drivers + +# +# Freertos Adc Drivers +# +# CONFIG_FREERTOS_USE_ADC is not set +# end of Freertos Adc Drivers + +# +# Freertos Can Drivers +# +# CONFIG_FREERTOS_USE_CAN is not set +# end of Freertos Can Drivers +# end of Component Configuration + +# +# FreeRTOS Setting +# +CONFIG_USE_LWIP=y + +# +# LWIP Configuration +# + +# +# LWIP Port Configuration +# +# CONFIG_LWIP_FGMAC is not set +CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING=y +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set +# end of LWIP Configuration + +CONFIG_USE_BACKTRACE=y +# CONFIG_USE_FATFS is not set +# CONFIG_USE_SFUD is not set +# CONFIG_USE_SPIFFS is not set +# CONFIG_USE_AMP is not set +CONFIG_USE_LETTER_SHELL=y + +# +# Letter Shell Configuration +# +CONFIG_LS_PL011_UART=y +CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART0 is not set +# CONFIG_DEFAULT_LETTER_SHELL_USE_UART2 is not set +# end of Letter Shell Configuration + +CONFIG_USE_TLSF=y +# CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set +# end of FreeRTOS Setting diff --git "a/example/network/xmac_lwip_test/pic/e2000demo\346\235\277\345\205\250\350\262\214.jpg" "b/example/network/xmac_lwip_test/pic/e2000demo\346\235\277\345\205\250\350\262\214.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..8134df9b5ad3f843694953e65757db31e7b9eab9 Binary files /dev/null and "b/example/network/xmac_lwip_test/pic/e2000demo\346\235\277\345\205\250\350\262\214.jpg" differ diff --git a/example/network/xmac_lwip_test/pic/select_demo.png b/example/network/xmac_lwip_test/pic/select_demo.png new file mode 100644 index 0000000000000000000000000000000000000000..bdfe19f08b88c110a92a4273ae89f74ea2fcc20e Binary files /dev/null and b/example/network/xmac_lwip_test/pic/select_demo.png differ diff --git a/example/network/xmac_lwip_test/pic/xmac_probe.png b/example/network/xmac_lwip_test/pic/xmac_probe.png new file mode 100644 index 0000000000000000000000000000000000000000..59f8c2f556710120cfcd0a7943a34054665da3ba Binary files /dev/null and b/example/network/xmac_lwip_test/pic/xmac_probe.png differ diff --git a/example/network/xmac_lwip_test/pic/xmac_probe_ipv6.png b/example/network/xmac_lwip_test/pic/xmac_probe_ipv6.png index 01294c2be599ef13e75e2c7273c92179f7171eb9..43c8fe8eb1663750a2322b469b8ff289e9380e5e 100644 Binary files a/example/network/xmac_lwip_test/pic/xmac_probe_ipv6.png and b/example/network/xmac_lwip_test/pic/xmac_probe_ipv6.png differ diff --git a/example/network/xmac_lwip_test/sdkconfig b/example/network/xmac_lwip_test/sdkconfig index 067dff9fafc2b511a6b03afbdbe39a04fa436426..9ee6c5008e326b2075a1eebac6ecb39c42005d05 100644 --- a/example/network/xmac_lwip_test/sdkconfig +++ b/example/network/xmac_lwip_test/sdkconfig @@ -2,20 +2,18 @@ # # Project Configuration # -CONFIG_TARGET_NAME="e2000d_freertos_a64" -CONFIG_LWIP_IPV4_TEST=y -# CONFIG_LWIP_IPV4_DHCP_TEST is not set -# CONFIG_LWIP_IPV6_TEST is not set -CONFIG_GMAC_RX_DESCNUM=256 -CONFIG_GMAC_TX_DESCNUM=256 -CONFIG_GMAC_IRQ_PRIORITY=12 +CONFIG_TARGET_NAME="e2000d_lwip_echo" # # E2000 board Configuration # -CONFIG_BOARD_TYPE_B=y +CONFIG_LWIP_IPV4_TEST=y +# CONFIG_LWIP_IPV4_DHCP_TEST is not set +# CONFIG_LWIP_IPV6_TEST is not set +# CONFIG_BOARD_TYPE_B is not set # CONFIG_BOARD_TYPE_C is not set # CONFIG_BOARD_TYPE_A is not set +CONFIG_BOARD_TYPE_DEMO=y # end of E2000 board Configuration # end of Project Configuration @@ -40,8 +38,8 @@ CONFIG_USE_SYS_TICK=y # # CONFIG_TARGET_F2000_4 is not set # CONFIG_TARGET_D2000 is not set -# CONFIG_TARGET_E2000Q is not set -CONFIG_TARGET_E2000D=y +CONFIG_TARGET_E2000Q=y +# CONFIG_TARGET_E2000D is not set # CONFIG_TARGET_E2000S is not set CONFIG_TARGET_E2000=y CONFIG_DEFAULT_DEBUG_PRINT_UART1=y @@ -99,10 +97,10 @@ CONFIG_USE_NEW_LIBC=y # # Building Option # -CONFIG_LOG_VERBOS=y +# CONFIG_LOG_VERBOS is not set # CONFIG_LOG_DEBUG is not set # CONFIG_LOG_INFO is not set -# CONFIG_LOG_WARN is not set +CONFIG_LOG_WARN=y # CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y @@ -118,13 +116,13 @@ CONFIG_INTERRUPT_ROLE_MASTER=y CONFIG_AARCH64_RAM_LD=y # CONFIG_USER_DEFINED_LD is not set CONFIG_LINK_SCRIPT_ROM=y -CONFIG_ROM_START_UP_ADDR=0x90000000 +CONFIG_ROM_START_UP_ADDR=0x80100000 CONFIG_ROM_SIZE_MB=1 CONFIG_LINK_SCRIPT_RAM=y -CONFIG_RAM_START_UP_ADDR=0x90500000 +CONFIG_RAM_START_UP_ADDR=0x80500000 CONFIG_RAM_SIZE_MB=64 CONFIG_HEAP_SIZE=1 -CONFIG_STACK_SIZE=0x1000 +CONFIG_STACK_SIZE=0x100000 CONFIG_FPU_STACK_SIZE=0x1000 # end of Linker Options @@ -215,8 +213,195 @@ CONFIG_USE_LWIP=y # # LWIP Configuration # + +# +# LWIP Port Configuration +# # CONFIG_LWIP_FGMAC is not set CONFIG_LWIP_FXMAC=y +# end of LWIP Port Configuration + +CONFIG_LWIP_LOCAL_HOSTNAME="phytium" + +# +# memory configuration +# +# CONFIG_LWIP_USE_MEM_POOL is not set +CONFIG_LWIP_USE_MEM_HEAP=y +CONFIG_MEM_SIZE=1 +CONFIG_MEM_ALIGNMENT=64 +# end of memory configuration + +# +# NETWORK_INTERFACE_OPTIONS +# +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +# end of NETWORK_INTERFACE_OPTIONS + +# +# LOOPIF +# +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 +# end of LOOPIF + +# +# SLIPIF +# +# CONFIG_LWIP_SLIP_SUPPORT is not set +# end of SLIPIF + +# +# Pbuf options +# +CONFIG_PBUF_POOL_BUFSIZE=2 +# end of Pbuf options + +# +# Internal Memory Pool Sizes +# +CONFIG_PBUF_POOL_SIZE=1 +# end of Internal Memory Pool Sizes + +CONFIG_LWIP_MAX_SOCKETS=10 + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# CONFIG_LWIP_NETBUF_RECVINFO is not set +# end of UDP + +# +# IPv4 +# +CONFIG_USE_IPV4_ONLY=y +CONFIG_LWIP_IP4_REASSEMBLY=y +CONFIG_LWIP_IP4_FRAG=y +# CONFIG_LWIP_IP_FORWARD is not set +CONFIG_IP_REASS_MAX_PBUFS=16 +# end of IPv4 + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING=y +# end of ICMP + +# +# DHCP +# +# CONFIG_LWIP_DHCP_ENABLE is not set +# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# end of DHCP + +# +# AUTOIP +# +# CONFIG_LWIP_AUTOIP is not set +# end of AUTOIP + +# +# DNS +# +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of DNS + +# +# TCP options +# +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP options + +CONFIG_LWIP_TCPIP_CORE_LOCKING=y + +# +# socket +# +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# end of socket + +# CONFIG_LWIP_STATS is not set + +# +# PPP +# +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# end of PPP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +# +# ipv6 +# +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# end of ipv6 + +CONFIG_LWIP_DEBUG=y +CONFIG_LWIP_NETIF_DEBUG=y +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# CONFIG_LWIP_SNTP_DEBUG is not set +# CONFIG_LWIP_DNS_DEBUG is not set # end of LWIP Configuration CONFIG_USE_BACKTRACE=y @@ -237,4 +422,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/network/xmac_lwip_test/sdkconfig.h b/example/network/xmac_lwip_test/sdkconfig.h index 6e435b201e7712ccb849269d99319ba99389113e..ae529bef514c0ae173f6b978a218eea045ef33e8 100644 --- a/example/network/xmac_lwip_test/sdkconfig.h +++ b/example/network/xmac_lwip_test/sdkconfig.h @@ -3,19 +3,17 @@ /* Project Configuration */ -#define CONFIG_TARGET_NAME "e2000d_freertos_a64" -#define CONFIG_LWIP_IPV4_TEST -/* CONFIG_LWIP_IPV4_DHCP_TEST is not set */ -/* CONFIG_LWIP_IPV6_TEST is not set */ -#define CONFIG_GMAC_RX_DESCNUM 256 -#define CONFIG_GMAC_TX_DESCNUM 256 -#define CONFIG_GMAC_IRQ_PRIORITY 12 +#define CONFIG_TARGET_NAME "e2000d_lwip_echo" /* E2000 board Configuration */ -#define CONFIG_BOARD_TYPE_B +#define CONFIG_LWIP_IPV4_TEST +/* CONFIG_LWIP_IPV4_DHCP_TEST is not set */ +/* CONFIG_LWIP_IPV6_TEST is not set */ +/* CONFIG_BOARD_TYPE_B is not set */ /* CONFIG_BOARD_TYPE_C is not set */ /* CONFIG_BOARD_TYPE_A is not set */ +#define CONFIG_BOARD_TYPE_DEMO /* end of E2000 board Configuration */ /* end of Project Configuration */ @@ -37,8 +35,8 @@ /* CONFIG_TARGET_F2000_4 is not set */ /* CONFIG_TARGET_D2000 is not set */ -/* CONFIG_TARGET_E2000Q is not set */ -#define CONFIG_TARGET_E2000D +#define CONFIG_TARGET_E2000Q +/* CONFIG_TARGET_E2000D is not set */ /* CONFIG_TARGET_E2000S is not set */ #define CONFIG_TARGET_E2000 #define CONFIG_DEFAULT_DEBUG_PRINT_UART1 @@ -89,10 +87,10 @@ /* Building Option */ -#define CONFIG_LOG_VERBOS +/* CONFIG_LOG_VERBOS is not set */ /* CONFIG_LOG_DEBUG is not set */ /* CONFIG_LOG_INFO is not set */ -/* CONFIG_LOG_WARN is not set */ +#define CONFIG_LOG_WARN /* CONFIG_LOG_ERROR is not set */ /* CONFIG_LOG_NONE is not set */ #define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG @@ -107,13 +105,13 @@ #define CONFIG_AARCH64_RAM_LD /* CONFIG_USER_DEFINED_LD is not set */ #define CONFIG_LINK_SCRIPT_ROM -#define CONFIG_ROM_START_UP_ADDR 0x90000000 +#define CONFIG_ROM_START_UP_ADDR 0x80100000 #define CONFIG_ROM_SIZE_MB 1 #define CONFIG_LINK_SCRIPT_RAM -#define CONFIG_RAM_START_UP_ADDR 0x90500000 +#define CONFIG_RAM_START_UP_ADDR 0x80500000 #define CONFIG_RAM_SIZE_MB 64 #define CONFIG_HEAP_SIZE 1 -#define CONFIG_STACK_SIZE 0x1000 +#define CONFIG_STACK_SIZE 0x100000 #define CONFIG_FPU_STACK_SIZE 0x1000 /* end of Linker Options */ @@ -188,8 +186,169 @@ /* LWIP Configuration */ +/* LWIP Port Configuration */ + /* CONFIG_LWIP_FGMAC is not set */ #define CONFIG_LWIP_FXMAC +/* end of LWIP Port Configuration */ +#define CONFIG_LWIP_LOCAL_HOSTNAME "phytium" + +/* memory configuration */ + +/* CONFIG_LWIP_USE_MEM_POOL is not set */ +#define CONFIG_LWIP_USE_MEM_HEAP +#define CONFIG_MEM_SIZE 1 +#define CONFIG_MEM_ALIGNMENT 64 +/* end of memory configuration */ + +/* NETWORK_INTERFACE_OPTIONS */ + +/* CONFIG_LWIP_NETIF_API is not set */ +/* CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set */ +/* end of NETWORK_INTERFACE_OPTIONS */ + +/* LOOPIF */ + +#define CONFIG_LWIP_NETIF_LOOPBACK +#define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8 +/* end of LOOPIF */ + +/* SLIPIF */ + +/* CONFIG_LWIP_SLIP_SUPPORT is not set */ +/* end of SLIPIF */ + +/* Pbuf options */ + +#define CONFIG_PBUF_POOL_BUFSIZE 2 +/* end of Pbuf options */ + +/* Internal Memory Pool Sizes */ + +#define CONFIG_PBUF_POOL_SIZE 1 +/* end of Internal Memory Pool Sizes */ +#define CONFIG_LWIP_MAX_SOCKETS 10 + +/* LWIP RAW API */ + +#define CONFIG_LWIP_MAX_RAW_PCBS 16 +/* end of LWIP RAW API */ + +/* TCP */ + +#define CONFIG_LWIP_MAX_ACTIVE_TCP 16 +#define CONFIG_LWIP_MAX_LISTENING_TCP 16 +#define CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION +#define CONFIG_LWIP_TCP_MAXRTX 12 +#define CONFIG_LWIP_TCP_SYNMAXRTX 12 +#define CONFIG_LWIP_TCP_MSS 1440 +#define CONFIG_LWIP_TCP_TMR_INTERVAL 250 +#define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 +#define CONFIG_LWIP_TCP_WND_DEFAULT 5744 +#define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 +#define CONFIG_LWIP_TCP_QUEUE_OOSEQ +/* CONFIG_LWIP_TCP_SACK_OUT is not set */ +#define CONFIG_LWIP_TCP_OVERSIZE_MSS +/* CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set */ +/* CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set */ +/* end of TCP */ + +/* UDP */ + +#define CONFIG_LWIP_MAX_UDP_PCBS 16 +#define CONFIG_LWIP_UDP_RECVMBOX_SIZE 6 +/* CONFIG_LWIP_NETBUF_RECVINFO is not set */ +/* end of UDP */ + +/* IPv4 */ + +#define CONFIG_USE_IPV4_ONLY +#define CONFIG_LWIP_IP4_REASSEMBLY +#define CONFIG_LWIP_IP4_FRAG +/* CONFIG_LWIP_IP_FORWARD is not set */ +#define CONFIG_IP_REASS_MAX_PBUFS 16 +/* end of IPv4 */ + +/* ICMP */ + +#define CONFIG_LWIP_ICMP +#define CONFIG_LWIP_MULTICAST_PING +#define CONFIG_LWIP_BROADCAST_PING +/* end of ICMP */ + +/* DHCP */ + +/* CONFIG_LWIP_DHCP_ENABLE is not set */ +/* CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set */ +/* CONFIG_LWIP_DHCP_GET_NTP_SRV is not set */ +/* CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set */ +/* CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set */ +#define CONFIG_LWIP_DHCP_OPTIONS_LEN 68 +#define CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +/* end of DHCP */ + +/* AUTOIP */ + +/* CONFIG_LWIP_AUTOIP is not set */ +/* end of AUTOIP */ + +/* DNS */ + +#define CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES +/* end of DNS */ + +/* TCP options */ + +#define CONFIG_LWIP_TCP_RTO_TIME 1500 +/* end of TCP options */ +#define CONFIG_LWIP_TCPIP_CORE_LOCKING + +/* socket */ + +/* CONFIG_LWIP_SO_LINGER is not set */ +#define CONFIG_LWIP_SO_REUSE +#define CONFIG_LWIP_SO_REUSE_RXTOALL +/* end of socket */ +/* CONFIG_LWIP_STATS is not set */ + +/* PPP */ + +/* CONFIG_LWIP_PPP_SUPPORT is not set */ +#define CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE 3 +#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 +/* end of PPP */ + +/* Checksums */ + +/* CONFIG_LWIP_CHECKSUM_CHECK_IP is not set */ +/* CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set */ +#define CONFIG_LWIP_CHECKSUM_CHECK_ICMP +/* end of Checksums */ + +/* ipv6 */ + +#define CONFIG_LWIP_IPV6 +/* CONFIG_LWIP_IPV6_AUTOCONFIG is not set */ +#define CONFIG_LWIP_IPV6_NUM_ADDRESSES 3 +/* CONFIG_LWIP_IPV6_FORWARD is not set */ +#define CONFIG_LWIP_IP6_FRAG +/* CONFIG_LWIP_IP6_REASSEMBLY is not set */ +/* end of ipv6 */ +#define CONFIG_LWIP_DEBUG +#define CONFIG_LWIP_NETIF_DEBUG +/* CONFIG_LWIP_PBUF_DEBUG is not set */ +/* CONFIG_LWIP_ETHARP_DEBUG is not set */ +/* CONFIG_LWIP_API_LIB_DEBUG is not set */ +/* CONFIG_LWIP_SOCKETS_DEBUG is not set */ +/* CONFIG_LWIP_IP_DEBUG is not set */ +/* CONFIG_LWIP_ICMP_DEBUG is not set */ +/* CONFIG_LWIP_DHCP_DEBUG is not set */ +/* CONFIG_LWIP_IP6_DEBUG is not set */ +/* CONFIG_LWIP_ICMP6_DEBUG is not set */ +/* CONFIG_LWIP_TCP_DEBUG is not set */ +/* CONFIG_LWIP_SNTP_DEBUG is not set */ +/* CONFIG_LWIP_DNS_DEBUG is not set */ /* end of LWIP Configuration */ #define CONFIG_USE_BACKTRACE /* CONFIG_USE_FATFS is not set */ @@ -207,6 +366,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/network/xmac_lwip_test/src/Kconfig b/example/network/xmac_lwip_test/src/Kconfig index 94fac00a08083465123f936489d1b78eb89a0cf2..52c6ba8b5a0069dcb8096b2e5eb9e6a30c5c7685 100644 --- a/example/network/xmac_lwip_test/src/Kconfig +++ b/example/network/xmac_lwip_test/src/Kconfig @@ -1,5 +1,40 @@ menu " E2000 board Configuration" + + choice EXAMPLE_IP_MODE + prompt "choice lwip config" + help + Example can multicast IPV4, IPV6, or both. + + default LWIP_IPV4_TEST + config LWIP_IPV4_TEST + bool "test lwip ipv4" + config LWIP_IPV4_DHCP_TEST + bool "test lwip ipv4 and dhcp" + config LWIP_IPV6_TEST + bool "test lwip ipv6" + endchoice + + config LWIP_IPV4_TEST + bool + select LWIP_ICMP + select USE_IPV4_ONLY + select LWIP_NETIF_DEBUG + + config LWIP_IPV4_DHCP_TEST + bool + select LWIP_DHCP_ENABLE + select LWIP_ICMP + select USE_IPV4_ONLY + select LWIP_NETIF_DEBUG + # select LWIP_DHCP_DEBUG + + config LWIP_IPV6_TEST + bool + select LWIP_IPV6 + select LWIP_NETIF_DEBUG + + config TARGET_NAME string "Build Target Name" default "eth test" @@ -17,6 +52,8 @@ menu " E2000 board Configuration" bool "evaluation board c" config BOARD_TYPE_A bool "evaluation board a" + config BOARD_TYPE_DEMO + bool "evaluation board demo" endchoice # BUILD_TARGET_ARCH_TYPE endmenu diff --git a/example/network/xmac_lwip_test/src/lwip_test.c b/example/network/xmac_lwip_test/src/lwip_test.c index a0c007bb87fd5462a72fa1455b1180d75e5edb79..2b1860f8f7cdefd192815567e96cc379b320bd35 100644 --- a/example/network/xmac_lwip_test/src/lwip_test.c +++ b/example/network/xmac_lwip_test/src/lwip_test.c @@ -94,7 +94,7 @@ void LwipTestCreate(void * args) BaseType_t ret = pdPASS; /* the mac address of the board. this should be unique per board */ unsigned char mac_ethernet_address[] = - {0x00, 0x04, 0x66, 0x00, 0x11, 0x22}; + {0x98, 0x0e, 0x24, 0x00, 0x11, 0x22}; echo_netif = pvPortMalloc(sizeof(struct netif)); if(echo_netif == NULL) @@ -147,14 +147,15 @@ void LwipTestCreate(void * args) netif_ip6_addr_set_state(echo_netif, 0, IP6_ADDR_VALID); printf("Board IPv6 address %x:%x:%x:%x:%x:%x:%x:%x\n\r", - IP6_ADDR_BLOCK1(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK2(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK3(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK4(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK5(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK6(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK7(&echo_netif->ip6_addr[0]), - IP6_ADDR_BLOCK8(&echo_netif->ip6_addr[0])); + IP6_ADDR_BLOCK1(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK2(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK3(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK4(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK5(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK6(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK7(&echo_netif->ip6_addr[0].u_addr.ip6), + IP6_ADDR_BLOCK8(&echo_netif->ip6_addr[0].u_addr.ip6)); + #endif @@ -193,7 +194,7 @@ void LwipTestCreate(void * args) ret = xTaskCreate((TaskFunction_t )LwipDhcpTest, /* 任务入口函数 */ (const char* )"LwipDhcpTest",/* 任务名字 */ - (uint16_t )4096, /* 任务栈大小 */ + (uint16_t )8192, /* 任务栈大小 */ (void* )(echo_netif),/* 任务入口函数参数 */ (UBaseType_t )configMAX_PRIORITIES-1, /* 任务的优先级 */ (TaskHandle_t* )&appTaskCreateHandle); /* 任务控制 */ diff --git a/example/peripheral/adc/configs/e2000d_aarch32_eg_configs b/example/peripheral/adc/configs/e2000d_aarch32_eg_configs index 5a6c4745f8c2c8339ca6cb84d9dc66a4f5271a39..f0bf9f4afc2ae2fc03c9731fa7ddb95ce5083701 100644 --- a/example/peripheral/adc/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/adc/configs/e2000d_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/adc/configs/e2000d_aarch64_eg_configs b/example/peripheral/adc/configs/e2000d_aarch64_eg_configs index 23f034a06becff399ffca766ba9d0e0740ff84c8..4e2e0dfec4ef3a32f2dbeba38ca8486a12998648 100644 --- a/example/peripheral/adc/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/adc/configs/e2000d_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/adc/configs/e2000q_aarch32_eg_configs b/example/peripheral/adc/configs/e2000q_aarch32_eg_configs index 352d71aa4cb6aa8381cb40ebfa15f18212813712..33297c696bfc2432cc6b6776ff0d6dd183b73e26 100644 --- a/example/peripheral/adc/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/adc/configs/e2000q_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/adc/configs/e2000q_aarch64_eg_configs b/example/peripheral/adc/configs/e2000q_aarch64_eg_configs index c7f11a2c9abbf54b76ebfea1e57d909d67df5143..81066e3c606ad6d5f642647b136ed2f0d6acdaf8 100644 --- a/example/peripheral/adc/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/adc/configs/e2000q_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/adc/sdkconfig b/example/peripheral/adc/sdkconfig index c7f11a2c9abbf54b76ebfea1e57d909d67df5143..81066e3c606ad6d5f642647b136ed2f0d6acdaf8 100644 --- a/example/peripheral/adc/sdkconfig +++ b/example/peripheral/adc/sdkconfig @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/adc/sdkconfig.h b/example/peripheral/adc/sdkconfig.h index 5a939a3481b65178226857e1edfb993506195abc..eb38cda4b1ff787a32117ba9ff07b76e9701e533 100644 --- a/example/peripheral/adc/sdkconfig.h +++ b/example/peripheral/adc/sdkconfig.h @@ -185,6 +185,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/can/configs/d2000_aarch32_eg_configs b/example/peripheral/can/configs/d2000_aarch32_eg_configs index 2b4275b343b6e305c1918e2cf86db97a0220cb33..21df156565e2e19858ac7e7134e1b32f3f90ef1d 100644 --- a/example/peripheral/can/configs/d2000_aarch32_eg_configs +++ b/example/peripheral/can/configs/d2000_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/d2000_aarch64_eg_configs b/example/peripheral/can/configs/d2000_aarch64_eg_configs index 20bc5a75a7fc3bf185b81966c4dcf0eb19d4a491..4f6cc9f82e64bea75659a3f010c254d51391c0dd 100644 --- a/example/peripheral/can/configs/d2000_aarch64_eg_configs +++ b/example/peripheral/can/configs/d2000_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/e2000d_aarch32_eg_configs b/example/peripheral/can/configs/e2000d_aarch32_eg_configs index 5380224b92728322693b7f3911ddf61440f7be7a..3cd7acf3de64693ee3a3363152f0580c7f2392ef 100644 --- a/example/peripheral/can/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/can/configs/e2000d_aarch32_eg_configs @@ -217,4 +217,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/e2000d_aarch64_eg_configs b/example/peripheral/can/configs/e2000d_aarch64_eg_configs index b3de0599463e395fa224812825cb1257dffe491c..6a693a60e600129bdda400967365491c6edb743a 100644 --- a/example/peripheral/can/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/can/configs/e2000d_aarch64_eg_configs @@ -213,4 +213,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/e2000q_aarch32_eg_configs b/example/peripheral/can/configs/e2000q_aarch32_eg_configs index b8802963115f6dca1e5feaae790ac39889814e15..8594079b22fc50c818cef68986187d736025828e 100644 --- a/example/peripheral/can/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/can/configs/e2000q_aarch32_eg_configs @@ -217,4 +217,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/e2000q_aarch64_eg_configs b/example/peripheral/can/configs/e2000q_aarch64_eg_configs index 021f45a862e31b34f5f804ccfc639a45427398df..d4e4e1f6e5ce65e05b2fb79d3e9f5e291e817c51 100644 --- a/example/peripheral/can/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/can/configs/e2000q_aarch64_eg_configs @@ -213,4 +213,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/ft2004_aarch32_eg_configs b/example/peripheral/can/configs/ft2004_aarch32_eg_configs index 317e341a9e8cc5a42cd6e01fdeb05efb12bec9f2..db34ea5bf4e30a7bba307d80736056112ad21636 100644 --- a/example/peripheral/can/configs/ft2004_aarch32_eg_configs +++ b/example/peripheral/can/configs/ft2004_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/configs/ft2004_aarch64_eg_configs b/example/peripheral/can/configs/ft2004_aarch64_eg_configs index 5111a792bf248e93728264f9979ac7b82ac4fa9e..405c6b734978b1c3499dc859149f2a11acf5721d 100644 --- a/example/peripheral/can/configs/ft2004_aarch64_eg_configs +++ b/example/peripheral/can/configs/ft2004_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/sdkconfig b/example/peripheral/can/sdkconfig index 021f45a862e31b34f5f804ccfc639a45427398df..d4e4e1f6e5ce65e05b2fb79d3e9f5e291e817c51 100644 --- a/example/peripheral/can/sdkconfig +++ b/example/peripheral/can/sdkconfig @@ -213,4 +213,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/can/sdkconfig.h b/example/peripheral/can/sdkconfig.h index 7b78d7ba2a446bf544f798e712dd4580f742c791..75a30b3b40911d0db7289754ebdc4cb4c1bca83e 100644 --- a/example/peripheral/can/sdkconfig.h +++ b/example/peripheral/can/sdkconfig.h @@ -186,6 +186,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs b/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs index dcb1c97ba2ee2494e9aa62544bda41fca821afad..ba85580bd4b54fbf34d228317ce6e367393ebc8b 100644 --- a/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/dma/ddma/configs/e2000d_aarch32_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs b/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs index 264ca1868a134a255fc2d2421cf73cffbc7302ce..0857033ff49946fc38c6ba4c16b6fe1e1b297ee6 100644 --- a/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/dma/ddma/configs/e2000d_aarch64_eg_configs @@ -208,4 +208,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/dma/ddma/sdkconfig b/example/peripheral/dma/ddma/sdkconfig index 264ca1868a134a255fc2d2421cf73cffbc7302ce..0857033ff49946fc38c6ba4c16b6fe1e1b297ee6 100644 --- a/example/peripheral/dma/ddma/sdkconfig +++ b/example/peripheral/dma/ddma/sdkconfig @@ -208,4 +208,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/dma/ddma/sdkconfig.h b/example/peripheral/dma/ddma/sdkconfig.h index a670826664e951c92d5e979e2e34a222c40896c1..e392df8816db870fe1f063af97dd1250b477776f 100644 --- a/example/peripheral/dma/ddma/sdkconfig.h +++ b/example/peripheral/dma/ddma/sdkconfig.h @@ -183,6 +183,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs b/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs index 95256b411ae704273e0b2a72b330808711b9d152..1ecbf2fd11784597e868c502301800004b3903af 100644 --- a/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/dma/gdma/configs/e2000d_aarch32_eg_configs @@ -211,4 +211,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs b/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs index 6dd9ba885eb1b8187a3c52a2bf8593fa473f0464..1486603cf60efc25c3207f0d2d1db9ad104d93da 100644 --- a/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/dma/gdma/configs/e2000d_aarch64_eg_configs @@ -207,4 +207,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/dma/gdma/sdkconfig b/example/peripheral/dma/gdma/sdkconfig index 6dd9ba885eb1b8187a3c52a2bf8593fa473f0464..1486603cf60efc25c3207f0d2d1db9ad104d93da 100644 --- a/example/peripheral/dma/gdma/sdkconfig +++ b/example/peripheral/dma/gdma/sdkconfig @@ -207,4 +207,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/dma/gdma/sdkconfig.h b/example/peripheral/dma/gdma/sdkconfig.h index 90bd3ebdd181944befe2fe084e1940f795b03ad4..d2e79f1c709c4fc6d0d5f254ad128d481778c701 100644 --- a/example/peripheral/dma/gdma/sdkconfig.h +++ b/example/peripheral/dma/gdma/sdkconfig.h @@ -182,6 +182,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs b/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs index 04ae2ba8ec12bbb1333ec2f8548c94f21e52728b..b3297007ce55cec7c7ee376938792aa3239a1f4b 100644 --- a/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/gpio/configs/e2000d_aarch32_eg_configs @@ -210,4 +210,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs b/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs index 463daeef3f0b5123914856dac4df7a8cd4d8643f..c73f2c12cadd52e4452f9667eadd4915ae75bcd1 100644 --- a/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/gpio/configs/e2000d_aarch64_eg_configs @@ -206,4 +206,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/gpio/sdkconfig b/example/peripheral/gpio/sdkconfig index 463daeef3f0b5123914856dac4df7a8cd4d8643f..c73f2c12cadd52e4452f9667eadd4915ae75bcd1 100644 --- a/example/peripheral/gpio/sdkconfig +++ b/example/peripheral/gpio/sdkconfig @@ -206,4 +206,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/gpio/sdkconfig.h b/example/peripheral/gpio/sdkconfig.h index 52be9ec531a96c65d9517d1f3daad24748c9d16a..6e502857321dfbe26f879b3d6a08f976fa0ff414 100644 --- a/example/peripheral/gpio/sdkconfig.h +++ b/example/peripheral/gpio/sdkconfig.h @@ -181,6 +181,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs b/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs index 04e82ee22ba5b76511f5c0105d61e6abf5d457e6..9bd36081bc7bc7424040f2e80f5b792aea113732 100644 --- a/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/pwm/configs/e2000d_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs b/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs index 37d670dbc6b653009a6e4e704311a1af02debd92..e81dc2b5ad8bfd6d0c3d528a5000d73b8903fbba 100644 --- a/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/pwm/configs/e2000d_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs b/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs index 9536d0e01847a2a0d9970561f728428f18cb883b..9f79adf5c1d22e689112f7d650fede1ad2e875db 100644 --- a/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/pwm/configs/e2000q_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs b/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs index 1f477b024344f122f8b4184d6ecfbb962d5d540b..ef77db983eb4e8267b1349ee889b729874db6990 100644 --- a/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/pwm/configs/e2000q_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/pwm/sdkconfig b/example/peripheral/pwm/sdkconfig index 1f477b024344f122f8b4184d6ecfbb962d5d540b..ef77db983eb4e8267b1349ee889b729874db6990 100644 --- a/example/peripheral/pwm/sdkconfig +++ b/example/peripheral/pwm/sdkconfig @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/pwm/sdkconfig.h b/example/peripheral/pwm/sdkconfig.h index 6c10faef5846f2405fb67ad312e4215796ca6f9a..8aeb473bcd156fa5ccbea02bf6ad56b71f807958 100644 --- a/example/peripheral/pwm/sdkconfig.h +++ b/example/peripheral/pwm/sdkconfig.h @@ -185,6 +185,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/qspi/configs/d2000_aarch32_eg_configs b/example/peripheral/qspi/configs/d2000_aarch32_eg_configs index 27ee8c8b3f3e3a81c18696a6ca7372ae8049fa49..0ac4198f3a331bbf70e2f4f9ed2b05fe1d022d60 100644 --- a/example/peripheral/qspi/configs/d2000_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/d2000_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/d2000_aarch64_eg_configs b/example/peripheral/qspi/configs/d2000_aarch64_eg_configs index ee6fa43ce020a03948ae2e1c98a1427211708340..6faa0f1e9ca93493f41fbf0fa31ae08a416bdf85 100644 --- a/example/peripheral/qspi/configs/d2000_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/d2000_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs b/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs index e7a5177497297a0ef252235fa9c4ae1a25e1c8d4..e7bdc8d602bb137dff5510efdee04b6eea47fa5d 100644 --- a/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/e2000d_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs b/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs index f800099a153f7df3315d33827292c5facec8d61f..ccbd39b3065b09a820e0e0726cad7bf93be433d1 100644 --- a/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/e2000d_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs b/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs index 03fdb8bfa03c527fdd3bbd7c88f04e768dbd6faf..3e11d71513f89c6d7f98f5e1a63fd6be1fad8216 100644 --- a/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/e2000q_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs b/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs index ed58351d51acb869ecfb0f208ba9ec3d55fbdc98..1dab65cf6d4a2c2d344529a816f7e9be75fd05a3 100644 --- a/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/e2000q_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs b/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs index da6c977fd165c9ed714e676f8d14a89498bcbf7e..5972fdd0ac0a0408cab3bc5effc9f90fff229d7a 100644 --- a/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs +++ b/example/peripheral/qspi/configs/ft2004_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs b/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs index 2da814a4d13ea2a3f95418635cfd1d8176201bd0..8bd0df2626fe1368cacf2ac8c3e8af1778231aae 100644 --- a/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs +++ b/example/peripheral/qspi/configs/ft2004_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/sdkconfig b/example/peripheral/qspi/sdkconfig index ed58351d51acb869ecfb0f208ba9ec3d55fbdc98..1dab65cf6d4a2c2d344529a816f7e9be75fd05a3 100644 --- a/example/peripheral/qspi/sdkconfig +++ b/example/peripheral/qspi/sdkconfig @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/qspi/sdkconfig.h b/example/peripheral/qspi/sdkconfig.h index ea49e6e66bea8f8e657b6a07e7b98e41c4896a41..39b0c06c54f38e6c639ac99c6511cf88dbac6fad 100644 --- a/example/peripheral/qspi/sdkconfig.h +++ b/example/peripheral/qspi/sdkconfig.h @@ -185,6 +185,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs b/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs index b80867fedbb73dfb0b220cc34f6b71a40f42873c..64f010423407f8111edb094e15b7bb41534c8497 100644 --- a/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/sdio/configs/e2000d_aarch32_eg_configs @@ -216,4 +216,6 @@ CONFIG_USE_SDMMC_CMD=y # CONFIG_SDMMC_PORT_FSDIO=y # end of SDMMC Configuration + +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs b/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs index b55ef0572b9407f33d62cbf1ac0a769f2af94dde..9a99079bd3671cf2b3ecb273c27d1c4048ae94e6 100644 --- a/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/sdio/configs/e2000d_aarch64_eg_configs @@ -212,4 +212,6 @@ CONFIG_USE_SDMMC_CMD=y # CONFIG_SDMMC_PORT_FSDIO=y # end of SDMMC Configuration + +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/sdio/sdkconfig b/example/peripheral/sdio/sdkconfig index b55ef0572b9407f33d62cbf1ac0a769f2af94dde..9a99079bd3671cf2b3ecb273c27d1c4048ae94e6 100644 --- a/example/peripheral/sdio/sdkconfig +++ b/example/peripheral/sdio/sdkconfig @@ -212,4 +212,6 @@ CONFIG_USE_SDMMC_CMD=y # CONFIG_SDMMC_PORT_FSDIO=y # end of SDMMC Configuration + +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/sdio/sdkconfig.h b/example/peripheral/sdio/sdkconfig.h index 4f9d87ae3d7e9458c0cf6c4df97b77d529ad58ae..36c7b85a45f3891e80a027430b15bc11612518a8 100644 --- a/example/peripheral/sdio/sdkconfig.h +++ b/example/peripheral/sdio/sdkconfig.h @@ -186,6 +186,7 @@ #define CONFIG_SDMMC_PORT_FSDIO /* end of SDMMC Configuration */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/spi/configs/e2000d_aarch32_eg_configs b/example/peripheral/spi/configs/e2000d_aarch32_eg_configs index 013713239d3f59eb2d3824952aee024fbfd45b5b..c014aa05a1570e11b384986e28d23e8baeeb01a2 100644 --- a/example/peripheral/spi/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/spi/configs/e2000d_aarch32_eg_configs @@ -218,4 +218,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/spi/configs/e2000d_aarch64_eg_configs b/example/peripheral/spi/configs/e2000d_aarch64_eg_configs index 8bfa203555d5781db1db07c06a4bb7a0d38bf84a..956cb09a9a9c96e5e99681b97d526f35dc0e2271 100644 --- a/example/peripheral/spi/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/spi/configs/e2000d_aarch64_eg_configs @@ -214,4 +214,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/spi/sdkconfig b/example/peripheral/spi/sdkconfig index 8bfa203555d5781db1db07c06a4bb7a0d38bf84a..956cb09a9a9c96e5e99681b97d526f35dc0e2271 100644 --- a/example/peripheral/spi/sdkconfig +++ b/example/peripheral/spi/sdkconfig @@ -214,4 +214,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/spi/sdkconfig.h b/example/peripheral/spi/sdkconfig.h index b57efb1979d893471b15e1ef23d7bddc28300675..239ec2a748d85f6b810ecc1ac5827a6864b59f1f 100644 --- a/example/peripheral/spi/sdkconfig.h +++ b/example/peripheral/spi/sdkconfig.h @@ -187,6 +187,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs index 7007137b04270e3bb37a8ec9859ec087ee3c6c41..ecbd00e88a113cbae6ab1e377f7946916585f3e6 100644 --- a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs +++ b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch32_eg_configs @@ -27,7 +27,7 @@ CONFIG_USE_AARCH64_L1_TO_AARCH32=y # CONFIG_TARGET_F2000_4 is not set # CONFIG_TARGET_D2000 is not set # CONFIG_TARGET_E2000Q is not set -# CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000D is not set CONFIG_TARGET_E2000S=y CONFIG_TARGET_E2000=y CONFIG_DEFAULT_DEBUG_PRINT_UART1=y diff --git a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs index c650a324140e62c4385452dc152f62a812fb7ca8..f1823f7834a570038e29c17e38841563ccbe7df1 100644 --- a/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs +++ b/example/peripheral/usb/cherryusb_host/configs/e2000s_aarch64_eg_configs @@ -27,7 +27,7 @@ CONFIG_USE_SYS_TICK=y # CONFIG_TARGET_F2000_4 is not set # CONFIG_TARGET_D2000 is not set # CONFIG_TARGET_E2000Q is not set -# CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000D is not set CONFIG_TARGET_E2000S=y CONFIG_TARGET_E2000=y CONFIG_DEFAULT_DEBUG_PRINT_UART1=y diff --git a/example/peripheral/usb/cherryusb_host/sdkconfig b/example/peripheral/usb/cherryusb_host/sdkconfig index c650a324140e62c4385452dc152f62a812fb7ca8..f1823f7834a570038e29c17e38841563ccbe7df1 100644 --- a/example/peripheral/usb/cherryusb_host/sdkconfig +++ b/example/peripheral/usb/cherryusb_host/sdkconfig @@ -27,7 +27,7 @@ CONFIG_USE_SYS_TICK=y # CONFIG_TARGET_F2000_4 is not set # CONFIG_TARGET_D2000 is not set # CONFIG_TARGET_E2000Q is not set -# CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000D is not set CONFIG_TARGET_E2000S=y CONFIG_TARGET_E2000=y CONFIG_DEFAULT_DEBUG_PRINT_UART1=y diff --git a/example/peripheral/usb/cherryusb_host/sdkconfig.h b/example/peripheral/usb/cherryusb_host/sdkconfig.h index 1493aa9b631588b6184d5e090af5cc5ef7356a73..ef67d74ffd0e9fb9558bf70e7289ddfeddf8257c 100644 --- a/example/peripheral/usb/cherryusb_host/sdkconfig.h +++ b/example/peripheral/usb/cherryusb_host/sdkconfig.h @@ -25,7 +25,7 @@ /* CONFIG_TARGET_F2000_4 is not set */ /* CONFIG_TARGET_D2000 is not set */ /* CONFIG_TARGET_E2000Q is not set */ -/* CONFIG_TARGET_E2000D=y */ +/* CONFIG_TARGET_E2000D is not set */ #define CONFIG_TARGET_E2000S #define CONFIG_TARGET_E2000 #define CONFIG_DEFAULT_DEBUG_PRINT_UART1 diff --git a/example/peripheral/wdt/configs/d2000_aarch32_eg_configs b/example/peripheral/wdt/configs/d2000_aarch32_eg_configs index df8d10c3c3493abd2eb759e4118b55048deea249..76098bcbb23b03e1e415b177520e33998ca54f38 100644 --- a/example/peripheral/wdt/configs/d2000_aarch32_eg_configs +++ b/example/peripheral/wdt/configs/d2000_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/configs/d2000_aarch64_eg_configs b/example/peripheral/wdt/configs/d2000_aarch64_eg_configs index 7be34972e555c1e801deeebb57610a05f15f0d06..1d2d7a81d164e19aba1d05defdd0d9851c9f214f 100644 --- a/example/peripheral/wdt/configs/d2000_aarch64_eg_configs +++ b/example/peripheral/wdt/configs/d2000_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs b/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs index 198c05b89e4b2d21882998b5b57d62af67c7810d..bb8130e22c62a332467b8e4deedb1ff16b87132b 100644 --- a/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs +++ b/example/peripheral/wdt/configs/e2000d_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs b/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs index 5a09073ea3b1adb2fa9041f000c474b7157b73ec..5b6d679c238cfe48d89b1922105f064e24261751 100644 --- a/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs +++ b/example/peripheral/wdt/configs/e2000d_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs b/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs index 65393228c23f88474f9fc4eb0bce1cba19e24d8c..0c4e6a66156af8f2e25e3265c4aecf47922fc0d7 100644 --- a/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs +++ b/example/peripheral/wdt/configs/ft2004_aarch32_eg_configs @@ -216,4 +216,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs b/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs index b64b810ab1fe9f8a2e588fbd076fe60f3b372ba1..d5e9c66c7a43cd7bd384f35b54d50a624a91ca03 100644 --- a/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs +++ b/example/peripheral/wdt/configs/ft2004_aarch64_eg_configs @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/sdkconfig b/example/peripheral/wdt/sdkconfig index 5a09073ea3b1adb2fa9041f000c474b7157b73ec..5b6d679c238cfe48d89b1922105f064e24261751 100644 --- a/example/peripheral/wdt/sdkconfig +++ b/example/peripheral/wdt/sdkconfig @@ -212,4 +212,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/peripheral/wdt/sdkconfig.h b/example/peripheral/wdt/sdkconfig.h index b3b4fae313e0eb7189c731b4ce3fc43ac866ec50..1c8b59bbc9d9f616d71970e00fcbe42d2d80895b 100644 --- a/example/peripheral/wdt/sdkconfig.h +++ b/example/peripheral/wdt/sdkconfig.h @@ -185,6 +185,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs index 2289194665678330a7b5948193190b763c8c7ee0..8b17a1da2a1321bcfe1daaeaa8d1fa276a8d84e8 100644 --- a/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/d2000_aarch32_eg_configs @@ -235,4 +235,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs index 9bd920e256c3991e891f9f1ded3248b3a18c31b1..2b35d2de14367812628246494c6e1a71ecf34757 100644 --- a/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/d2000_aarch64_eg_configs @@ -231,4 +231,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs index 9614b73b47e5fc5ed94d0c80700a2b4d9b508368..85b81d19e1ea112d60f8d46dc967d1f443766078 100644 --- a/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000d_aarch32_eg_configs @@ -235,4 +235,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs index a165e34363c0250922744ea0684f824bd2005d0b..6a2d29daf283d6bfe4605b9c19cbf9d206ed2564 100644 --- a/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000d_aarch64_eg_configs @@ -231,4 +231,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs index f44aabed32774c6a13c7f9648db552639f3c3ee4..015408c1051a0612794f974b25a16f4c3a48900d 100644 --- a/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000q_aarch32_eg_configs @@ -235,4 +235,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs index 4d34dd779bf928b611fe370c87c58f7fbd32639a..4004e2e6d46119b1b9087e5a42b2d329f67049d1 100644 --- a/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/e2000q_aarch64_eg_configs @@ -231,4 +231,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs b/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs index 3a2c41068986efa51ea675b7fc8ccc7ea850161d..a190e8e7d6e8c34ea36e8b2f1972734d0253beae 100644 --- a/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs +++ b/example/storage/qspi_spiffs/configs/ft2004_aarch32_eg_configs @@ -235,4 +235,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs b/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs index 259919c7ff1f890716000e1fc3dcc122aef5f4f2..3ab805e7e75b08aba16ea5536bedb9ec6db33856 100644 --- a/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs +++ b/example/storage/qspi_spiffs/configs/ft2004_aarch64_eg_configs @@ -231,4 +231,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/sdkconfig b/example/storage/qspi_spiffs/sdkconfig index 4d34dd779bf928b611fe370c87c58f7fbd32639a..4004e2e6d46119b1b9087e5a42b2d329f67049d1 100644 --- a/example/storage/qspi_spiffs/sdkconfig +++ b/example/storage/qspi_spiffs/sdkconfig @@ -231,4 +231,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y # CONFIG_USE_TLSF is not set # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/qspi_spiffs/sdkconfig.h b/example/storage/qspi_spiffs/sdkconfig.h index 49c8dca702d88626348f2255920127338d383060..978530b073ece080f9d7cd9d9aea880175f1fb3a 100644 --- a/example/storage/qspi_spiffs/sdkconfig.h +++ b/example/storage/qspi_spiffs/sdkconfig.h @@ -200,6 +200,7 @@ /* end of Letter Shell Configuration */ /* CONFIG_USE_TLSF is not set */ /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs b/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs index 7e4c0d2dc2e60a793641899c91bea8e2537ad190..ada6a28a2ccde9c217030d2318a64fdde0651fd4 100644 --- a/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/d2000_aarch32_eg_configs @@ -233,4 +233,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs b/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs index f1eebcede177f86599d89e2dfcc97038f9e7444e..887b52f0d686be2dfd9ea391915a377131767129 100644 --- a/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/d2000_aarch64_eg_configs @@ -229,4 +229,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs b/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs index 29c2b3a3aff5008b7e8557ff9ae529ff01e7874b..e641de063e59d347d9f13f27501393b96a2374ae 100644 --- a/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000d_aarch32_eg_configs @@ -227,4 +227,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs b/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs index 853bb29e4aff4830be4a86d2e7c8b8996c02348e..1b5ead15373043586ed9b89ec501c7035087016b 100644 --- a/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000d_aarch64_eg_configs @@ -223,4 +223,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs b/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs index a63fe963e9bb0cd6437654ee191cbf64320dcc4f..776a5de1956bf09a8285c358d4ef7b29ade9c6a8 100644 --- a/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000q_aarch32_eg_configs @@ -227,4 +227,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs b/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs index 95e1c910b857da2c4036a7ec06acc9457f41b2ed..6b410bdbcaaf0f4ae02fba874170bf9824a5f206 100644 --- a/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/e2000q_aarch64_eg_configs @@ -223,4 +223,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs b/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs index 27c31f323b7752e1a9a521b994040e7750c232ec..1570e26b22ab39f5c11f30f9af61e6b3f535fafc 100644 --- a/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs +++ b/example/storage/sata_fatfs/configs/ft2004_aarch32_eg_configs @@ -233,4 +233,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs b/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs index 3f1ef095d4a29f3e554f3900bab401d3135f5bb7..3868441ac8e84089cb1267aa7e154178398dc083 100644 --- a/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs +++ b/example/storage/sata_fatfs/configs/ft2004_aarch64_eg_configs @@ -229,4 +229,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/sdkconfig b/example/storage/sata_fatfs/sdkconfig index 95e1c910b857da2c4036a7ec06acc9457f41b2ed..6b410bdbcaaf0f4ae02fba874170bf9824a5f206 100644 --- a/example/storage/sata_fatfs/sdkconfig +++ b/example/storage/sata_fatfs/sdkconfig @@ -223,4 +223,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/storage/sata_fatfs/sdkconfig.h b/example/storage/sata_fatfs/sdkconfig.h index 9d753391e69653f86412b5de5d3e74ad8bb87677..08f529aa1b23b64b2d9b4ee98b6742b22003807b 100644 --- a/example/storage/sata_fatfs/sdkconfig.h +++ b/example/storage/sata_fatfs/sdkconfig.h @@ -194,6 +194,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/example/template/configs/d2000_aarch32_eg_configs b/example/template/configs/d2000_aarch32_eg_configs index c8911c8a289263fc4658b167eb1e060d8febf51f..f75409dd6b59bfe74c23dc4c71b30bac8e54e128 100644 --- a/example/template/configs/d2000_aarch32_eg_configs +++ b/example/template/configs/d2000_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/configs/d2000_aarch64_eg_configs b/example/template/configs/d2000_aarch64_eg_configs index 9564ed29fbcc1e3e3031ae52c7ee391f070c0cf4..8479669d3e355e4aacef8d7d14d663e3be930842 100644 --- a/example/template/configs/d2000_aarch64_eg_configs +++ b/example/template/configs/d2000_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/configs/e2000d_aarch32_eg_configs b/example/template/configs/e2000d_aarch32_eg_configs index c47c391111e545d9da5349b593d59e4aec105057..2bd43e711f00f82227c30cd0cc8fccdb267b9b90 100644 --- a/example/template/configs/e2000d_aarch32_eg_configs +++ b/example/template/configs/e2000d_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/configs/e2000d_aarch64_eg_configs b/example/template/configs/e2000d_aarch64_eg_configs index 852df71fe40fbea6b5e46caa0ac4b26582faacbb..b8c6027e4cfb07936cd1c7588a1c3ba24241457e 100644 --- a/example/template/configs/e2000d_aarch64_eg_configs +++ b/example/template/configs/e2000d_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/configs/ft2004_aarch32_eg_configs b/example/template/configs/ft2004_aarch32_eg_configs index 94bd24b0ea49be43d1df0211532f8bcaf77c87e9..77be645ad12963fe6ff9c2490cc04e19d984c26b 100644 --- a/example/template/configs/ft2004_aarch32_eg_configs +++ b/example/template/configs/ft2004_aarch32_eg_configs @@ -209,4 +209,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/configs/ft2004_aarch64_eg_configs b/example/template/configs/ft2004_aarch64_eg_configs index eb694b5a427ee0983c9b1e9f2cf142f65b3753b5..b095059c6750cd7540b6219a6c944eed5780981b 100644 --- a/example/template/configs/ft2004_aarch64_eg_configs +++ b/example/template/configs/ft2004_aarch64_eg_configs @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/sdkconfig b/example/template/sdkconfig index 852df71fe40fbea6b5e46caa0ac4b26582faacbb..b8c6027e4cfb07936cd1c7588a1c3ba24241457e 100644 --- a/example/template/sdkconfig +++ b/example/template/sdkconfig @@ -205,4 +205,5 @@ CONFIG_DEFAULT_LETTER_SHELL_USE_UART1=y CONFIG_USE_TLSF=y # CONFIG_USE_SDMMC_CMD is not set +# CONFIG_USE_CHERRY_USB is not set # end of FreeRTOS Setting diff --git a/example/template/sdkconfig.h b/example/template/sdkconfig.h index 784d2fb2927f0db68aafbded9ff40b935c7d3db0..3690ee18f70d80880a7bd41a0b63d91be9249903 100644 --- a/example/template/sdkconfig.h +++ b/example/template/sdkconfig.h @@ -180,6 +180,7 @@ /* end of Letter Shell Configuration */ #define CONFIG_USE_TLSF /* CONFIG_USE_SDMMC_CMD is not set */ +/* CONFIG_USE_CHERRY_USB is not set */ /* end of FreeRTOS Setting */ #endif diff --git a/install.py b/install.py index 51a1e19e69a93206c6fa83de530383c035038a5e..581a123e50bdfc5bcb021c2a5750904d5c8c2a4a 100644 --- a/install.py +++ b/install.py @@ -86,7 +86,7 @@ os.system("chmod +x ./make/*.mk --silent ") os.system("chmod +x ./lib/Kconfiglib/*.py --silent ") # Add standalone sdk -standalone_sdk_v="802532c44dcb30a10024326742d2bea46b33735e" +standalone_sdk_v="c98d99f611a1aaf39d996e630a46e0213d390109" standalone_path=freertos_sdk_path + '/standalone' standalone_branche="master" standalone_remote="https://gitee.com/phytium_embedded/phytium-standalone-sdk.git" diff --git a/make/complier.mk b/make/complier.mk index 7fa15f2a21e1a65989d0458f611b91f84ada1022..c2a7c60d3c234b29b0db21636d1d8388afd2cfc1 100755 --- a/make/complier.mk +++ b/make/complier.mk @@ -218,6 +218,7 @@ clean: $(call RM_FILES,*.map) $(call RM_FILES,*.tar.gz) $(call RM_FILES,*.asm) + $(call RM_FILES,*.out) # Make sure everything is rebuilt if this makefile is changed $(OBJ_FILES) $(APP): makefile diff --git a/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c b/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c index 2bb9f7ab03293259edce81e476b4775b03af0a5d..88dce42571919ba08787e556a3994c6eee0b14e5 100644 --- a/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c +++ b/third-party/fatfs-0.1.3/port/fsata_controller/diskio.c @@ -16,9 +16,6 @@ #include "fsata.h" #include "fsata_hw.h" -#define HOST_NUM 0 /* sata host */ -#define PORT_NUM 0 /* sata link port */ - #define FSATA_DEBUG_TAG "FSATA-CONTROLLER-DISKIO" #define FSATA_ERROR(format, ...) FT_DEBUG_PRINT_E(FSATA_DEBUG_TAG, format, ##__VA_ARGS__) #define FSATA_WARN(format, ...) FT_DEBUG_PRINT_W(FSATA_DEBUG_TAG, format, ##__VA_ARGS__) @@ -28,40 +25,41 @@ /* 64位需要预留给内存池更大的空间 */ static u8 mem[50000] __attribute__((aligned(1024))) = {0}; -#define SATA_PORT_MEM_SIZE 0x00000C00 - -static u32 port_mem_count = 0; +#define ADDR_ALIGNMENT 1024 static FSataCtrl sata_device[FSATA_INSTANCE_NUM];//最多支持16个ahci控制器,可以自行定义个数 -static s32 sata_host_count; static boolean sata_ok = FALSE; +static u32 host_num = 0; /* sata host */ +static u32 port_num = 0; /* sata link port */ + /*-----------------------------------------------------------------------*/ /* Get Drive Status */ /*-----------------------------------------------------------------------*/ -DSTATUS disk_status ( - BYTE pdrv /* Physical drive nmuber to identify the drive */ +DSTATUS +disk_status( + BYTE pdrv /* Physical drive nmuber to identify the drive */ ) { DSTATUS status = STA_NOINIT; - if (FT_COMPONENT_IS_READY == sata_device[HOST_NUM].is_ready) + if (FT_COMPONENT_IS_READY == sata_device[host_num].is_ready) status &= ~STA_NOINIT; /* 假设Sata处于插入状态 */ return status; } static int FSataInit(void) -{ - s32 i; - u32 j; - u8 id = 0; +{ + u32 instance_id = 0; + u32 port = 0; + u32 port_mem_count = 0; + u8 link_success = 0; const FSataConfig *config_p = NULL; FSataCtrl *instance_p; - FError status = FSATA_SUCCESS; FError ret = FSATA_SUCCESS; boolean host_valid = FALSE; @@ -71,71 +69,61 @@ static int FSataInit(void) return 0; } - for(i = 0; i < FSATA_INSTANCE_NUM; i++) - { - instance_p = &(sata_device[i]); - memset(instance_p, 0, sizeof(*instance_p)); - } - - /* get xhci host from fsata_g.c */ - for(id = 0;id < FSATA_INSTANCE_NUM; id++) + for (instance_id = 0; instance_id < FSATA_INSTANCE_NUM; instance_id++) { - config_p = FSataLookupConfig(id, FSATA_TYPE_CONTROLLER); - /* 如果有一个定义的PLATFORM AHCI HOST,则获取,否则跳过 */ - if(config_p->base_addr != 0) + host_valid = FALSE; + config_p = FSataLookupConfig(instance_id, FSATA_TYPE_CONTROLLER); + if(config_p != NULL) { - /* base不为0,表示有platform ahci自定义 */ - status = FSataCfgInitialize(&sata_device[sata_host_count], config_p); - if (FSATA_SUCCESS != status) + ret = FSataCfgInitialize(&sata_device[instance_id], config_p); + if (FSATA_SUCCESS != ret) { - FSATA_ERROR("init sata failed, status: 0x%x", status); + FSATA_ERROR("init sata failed, ret: 0x%x", ret); continue; } - FSATA_DEBUG("plat ahci host[%d] base_addr = 0x%x", id, sata_device[sata_host_count].config.base_addr); - FSATA_DEBUG("plat ahci host[%d] irq_num = %d", id, sata_device[sata_host_count].config.irq_num); - sata_host_count++; + FSATA_DEBUG("plat ahci host[%d] base_addr = 0x%x", instance_id, sata_device[instance_id].config.base_addr); + FSATA_DEBUG("plat ahci host[%d] irq_num = %d", instance_id, sata_device[instance_id].config.irq_num); } else { continue; } - } - FSATA_DEBUG("sata_host_count = %d\n", sata_host_count); - for (i = 0; i < sata_host_count; i++) - { - host_valid = FALSE; - instance_p = &(sata_device[i]); + + instance_p = &sata_device[instance_id]; /* init ahci controller and port */ - status = FSataAhciInit(instance_p); - if (FSATA_SUCCESS != status) + ret = FSataAhciInit(instance_p); + if (FSATA_SUCCESS != ret) { FSataCfgDeInitialize(instance_p); - FSATA_ERROR("FSataAhciInit sata failed, status: 0x%x", status); + FSATA_ERROR("FSataAhciInit sata failed, ret: 0x%x", ret); continue; } FSATA_DEBUG("instance_p->n_ports = %d\n", instance_p->n_ports); - for (j = 0; j < instance_p->n_ports; j++) + for (port = 0; port < instance_p->n_ports; port++) { u32 port_map = instance_p->port_map; - if (!(port_map & (1 << j))) + if (!(port_map & BIT(port))) continue; - ret = FSataAhciPortStart(instance_p, j, (uintptr)mem + SATA_PORT_MEM_SIZE*port_mem_count); - port_mem_count++; + + /* command list address must be 1K-byte aligned */ + ret = FSataAhciPortStart(instance_p, port, + (uintptr)mem + PALIGN_UP(FSATA_AHCI_PORT_PRIV_DMA_SZ, ADDR_ALIGNMENT) * port_mem_count); + port_mem_count++; if (FSATA_SUCCESS != ret) { - FSATA_ERROR("FSataAhciPortStart host %d port %d failed, ret: 0x%x", i, j, ret); + FSATA_ERROR("FSataAhciPortStart %d-%d failed, ret: 0x%x", instance_id, port, ret); continue; } - ret = FSataAhciReadInfo(instance_p, j); + ret = FSataAhciReadInfo(instance_p, port); if (FSATA_SUCCESS != ret) { FSataCfgDeInitialize(instance_p); - FSATA_ERROR("FSataAhciReadInfo %d-%d failed, ret: 0x%x", i, j, ret); + FSATA_ERROR("FSataAhciReadInfo %d-%d failed, ret: 0x%x", instance_id, port, ret); continue; } if(FSATA_SUCCESS == ret) @@ -148,6 +136,32 @@ static int FSataInit(void) sata_ok = TRUE; + /* get host number and port number which link success */ + for(host_num = 0; host_num < FSATA_INSTANCE_NUM; host_num++) + { + for (port_num = 0; port_num < sata_device[host_num].n_ports; port_num++) + { + if (!(sata_device[host_num].link_port_map & BIT(port_num))) + { + printf("host_num %d port_num %d is not link\n", host_num, port_num); + continue; + } + else + { + printf("host_num %d port_num %d is link\n", host_num, port_num); + link_success = 1; + break; + } + } + if(link_success == 1) + break; + } + if(link_success != 1) + { + FSATA_ERROR("Sata host port link failed\n"); + return -1; + } + return 0; } @@ -191,7 +205,7 @@ DRESULT disk_read ( BYTE *io_buf = buff; UINT err = FSATA_SUCCESS; - err = FSataReadWrite(&sata_device[HOST_NUM], PORT_NUM, sector, count, io_buf, 0); + err = FSataReadWrite(&sata_device[host_num], port_num, sector, count, io_buf, FALSE, FALSE); if (FSATA_SUCCESS != err) { @@ -217,7 +231,7 @@ DRESULT disk_write ( const BYTE *io_buf = buff; UINT err = FSATA_SUCCESS; - err = FSataReadWrite(&sata_device[HOST_NUM], PORT_NUM, sector, count, (u8 *)io_buf, 1); + err = FSataReadWrite(&sata_device[host_num], port_num, sector, count, (u8 *)io_buf, FALSE, TRUE); if (FSATA_SUCCESS != err) { @@ -249,7 +263,7 @@ DRESULT disk_ioctl ( break; /* 所有可用的扇区数目(逻辑寻址即LBA寻址方式) */ case GET_SECTOR_COUNT: - *((DWORD *)buff) = sata_device[HOST_NUM].port[PORT_NUM].dev_info.lba512; + *((DWORD *)buff) = sata_device[host_num].port[port_num].dev_info.lba512; res = RES_OK; break; /* 返回磁盘扇区大小, 只用于f_mkfs() */ @@ -258,7 +272,7 @@ DRESULT disk_ioctl ( break; /* 每个扇区有多少个字节 */ case GET_BLOCK_SIZE: - *((DWORD *)buff) = sata_device[HOST_NUM].port[PORT_NUM].dev_info.blksz; + *((DWORD *)buff) = sata_device[host_num].port[port_num].dev_info.blksz; res = RES_OK; break; case CTRL_TRIM: diff --git a/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c b/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c index d8bac869c64228cdf0e44d1e97511bf8ef37c834..1043863af93c76e3b6cfb2edb035b9ca4804e8d4 100644 --- a/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c +++ b/third-party/fatfs-0.1.3/port/fsata_pcie/diskio.c @@ -20,8 +20,6 @@ #include "fsata.h" #include "fsata_hw.h" -#define PORT_NUM 0 /* sata link port 1 */ - #define FSATA_DEBUG_TAG "FSATA-PCIE-DISKIO" #define FSATA_ERROR(format, ...) FT_DEBUG_PRINT_E(FSATA_DEBUG_TAG, format, ##__VA_ARGS__) #define FSATA_WARN(format, ...) FT_DEBUG_PRINT_W(FSATA_DEBUG_TAG, format, ##__VA_ARGS__) @@ -33,16 +31,18 @@ static u8 mem[50000] __attribute__((aligned(1024))) = {0}; #define PCI_CLASS_STORAGE_SATA_AHCI 0x010601 -#define SATA_PORT_MAX_NUM 4 -#define SATA_HOST_MAX_NUM 16 +#define SATA_HOST_MAX_NUM PLAT_AHCI_HOST_MAX_COUNT -static u32 port_mem_count = 0; +#define ADDR_ALIGNMENT 1024 static FSataCtrl sata_device[SATA_HOST_MAX_NUM];//最多支持16个ahci控制器,可以自行定义个数 static s32 sata_host_count = 0; static boolean sata_ok = FALSE; +static s32 host_num = 0; /* sata host */ +static u32 port_num = 0; /* sata link port */ + static FPcie pcie_obj = {0}; /*-----------------------------------------------------------------------*/ /* Get Drive Status */ @@ -54,7 +54,7 @@ DSTATUS disk_status ( { DSTATUS status = STA_NOINIT; - if (FT_COMPONENT_IS_READY == sata_device[PORT_NUM].is_ready) + if (FT_COMPONENT_IS_READY == sata_device[host_num].is_ready) status &= ~STA_NOINIT; /* 假设Sata处于插入状态 */ return status; @@ -114,16 +114,16 @@ static uintptr_t SataPcieIrqInstall(FSataCtrl* ahci_ctl, u32 bdf) static int FSataInit(void) { int ret; - s32 i; - u32 j; + s32 host = 0; + u32 port = 0; u32 bdf; u32 class; u16 pci_command; const u32 class_code = PCI_CLASS_STORAGE_SATA_AHCI; - u8 port_num_max = SATA_PORT_MAX_NUM; uintptr bar_addr = 0; u16 vid, did; - u8 id = 0; + u32 port_mem_count = 0; + u8 link_success = 0; const FSataConfig *config_p = NULL; FSataCtrl *instance_p; @@ -137,12 +137,12 @@ static int FSataInit(void) return 0; } - for(i = 0; i < SATA_HOST_MAX_NUM; i++) + for(host = 0; host < SATA_HOST_MAX_NUM; host++) { - instance_p = &(sata_device[i]); + instance_p = &sata_device[host]; memset(instance_p, 0, sizeof(*instance_p)); - config_p = FSataLookupConfig(id, FSATA_TYPE_CONTROLLER); - status = FSataCfgInitialize(&sata_device[sata_host_count], config_p); + config_p = FSataLookupConfig(host, FSATA_TYPE_PCIE); + status = FSataCfgInitialize(&sata_device[host], config_p); if (FSATA_SUCCESS != status) { FSATA_ERROR("init sata failed, status: 0x%x", status); @@ -150,10 +150,10 @@ static int FSataInit(void) } } - /* find xhci host from pcie instance */ - for(i = 0; i < pcie->scaned_bdf_count; i++) + /* find host from pcie instance */ + for(host = 0; host < pcie->scaned_bdf_count; host++) { - bdf = pcie->scaned_bdf_array[i]; + bdf = pcie->scaned_bdf_array[host]; FPcieEcamReadConfig32bit(pcie->config.ecam, bdf, FPCI_CLASS_REVISION, &class) ; class = (class) >> 8 ; @@ -165,73 +165,97 @@ static int FSataInit(void) FSATA_DEBUG("AHCI-PCI HOST found !!!, b.d.f = %x.%x.%x\n", FPCIE_BUS(bdf), FPCIE_DEV(bdf), FPCIE_FUNC(bdf)); FPcieEcamReadConfig32bit(pcie->config.ecam, bdf, FPCIE_BASE_ADDRESS_5, (u32*)&bar_addr); - FSATA_DEBUG("FSataPcieIntrInstall BarAddress %p \r\n", bar_addr); + FSATA_DEBUG("FSataPcieIntrInstall BarAddress %p", bar_addr); if (0x0 == bar_addr) { - ret = -1; - FSATA_DEBUG("Bar address: 0x%lx", bar_addr); - break; + FSATA_ERROR("Bar address: 0x%lx", bar_addr); + return -1; } FPcieEcamReadConfig16bit(pcie->config.ecam, bdf, FPCIE_COMMAND_REG, &pci_command); pci_command |= FPCIE_COMMAND_MASTER; FPcieEcamWriteConfig16bit(pcie->config.ecam, bdf, FPCIE_COMMAND_REG, pci_command); - SataPcieIrqInstall(&(sata_device[sata_host_count]) ,bdf); + SataPcieIrqInstall(&sata_device[sata_host_count] ,bdf); sata_device[sata_host_count].config.base_addr = bar_addr; FSATA_DEBUG("sata_device[%d].config.base_addr = 0x%x\n", sata_host_count, sata_device[sata_host_count].config.base_addr); - sata_device[sata_host_count].is_ready = FT_COMPONENT_IS_READY; sata_host_count++; + if(sata_host_count >= SATA_HOST_MAX_NUM) + break; } } - if(ret == -1) - { - return ret; - } - FSATA_DEBUG("scaned %d ahci host\n", sata_host_count); - for(i = 0; i < sata_host_count; i++) + for(host = 0; host < sata_host_count; host++) { - instance_p = &(sata_device[i]); + instance_p = &sata_device[host]; /* Initialization */ status = FSataAhciInit(instance_p); if (FSATA_SUCCESS != status) { FSataCfgDeInitialize(instance_p); - FSATA_ERROR("FSataAhciRestart sata failed, ret: 0x%x", status); + FSATA_ERROR("FSataAhciInit sata failed, ret: 0x%x", status); continue; } - for (j = 0; j < instance_p->n_ports; j++) + for (port = 0; port < instance_p->n_ports; port++) { u32 port_map = instance_p->port_map; - if (!(port_map & (1 << j))) + if (!(port_map & BIT(port))) continue; - ret = FSataAhciPortStart(instance_p, j, (uintptr)mem + 1024*3*port_mem_count); + + /* command list address must be 1K-byte aligned */ + ret = FSataAhciPortStart(instance_p, port, + (uintptr)mem + PALIGN_UP(FSATA_AHCI_PORT_PRIV_DMA_SZ, ADDR_ALIGNMENT) * port_mem_count); + port_mem_count++; if (FSATA_SUCCESS != ret) { - FSATA_ERROR("FSataAhciPortStart port %d failed, ret: 0x%x", j, ret); + FSATA_ERROR("FSataAhciPortStart port %d failed, ret: 0x%x", port, ret); continue; } - status = FSataAhciReadInfo(instance_p, j); + status = FSataAhciReadInfo(instance_p, port); if (FSATA_SUCCESS != status) { FSataCfgDeInitialize(instance_p); FSATA_ERROR("FSataAhciReadInfo failed, ret: 0x%x", status); continue; } - FSATA_DEBUG("\n"); + } - } - FSATA_DEBUG("Formatting sata device......\r\n"); + sata_ok = TRUE; + /* get host number and port number which link success */ + for(host_num = 0; host_num < sata_host_count; host_num++) + { + for (port_num = 0; port_num < sata_device[host_num].n_ports; port_num++) + { + if (!(sata_device[host_num].link_port_map & BIT(port_num))) + { + printf("host_num %d port_num %d is not link\n", host_num, port_num); + continue; + } + else + { + printf("host_num %d port_num %d is link\n", host_num, port_num); + link_success = 1; + break; + } + } + if(link_success == 1) + break; + } + if(link_success != 1) + { + FSATA_ERROR("Sata host port link failed\n"); + return -1; + } + return 0; } @@ -282,7 +306,7 @@ DRESULT disk_read ( BYTE *io_buf = buff; UINT err = FSATA_SUCCESS; - err = FSataReadWrite(&sata_device[PORT_NUM], PORT_NUM, sector, count, io_buf, 0); + err = FSataReadWrite(&sata_device[host_num], port_num, sector, count, io_buf, FALSE, FALSE); if (FSATA_SUCCESS != err) { @@ -308,7 +332,7 @@ DRESULT disk_write ( const BYTE *io_buf = buff; UINT err = FSATA_SUCCESS; - err = FSataReadWrite(&sata_device[PORT_NUM], PORT_NUM, sector, count, (u8 *)io_buf, 1); + err = FSataReadWrite(&sata_device[host_num], port_num, sector, count, (u8 *)io_buf, FALSE, TRUE); if (FSATA_SUCCESS != err) { @@ -340,7 +364,7 @@ DRESULT disk_ioctl ( break; /* 所有可用的扇区数目(逻辑寻址即LBA寻址方式) */ case GET_SECTOR_COUNT: - *((DWORD *)buff) = sata_device[PORT_NUM].port[PORT_NUM].dev_info.lba512; + *((DWORD *)buff) = sata_device[host_num].port[port_num].dev_info.lba512; res = RES_OK; /* 最多使用1000个sector */ break; /* 返回磁盘扇区大小, 只用于f_mkfs() */ @@ -349,7 +373,7 @@ DRESULT disk_ioctl ( break; /* 每个扇区有多少个字节 */ case GET_BLOCK_SIZE: - *((DWORD *)buff) = sata_device[PORT_NUM].port[PORT_NUM].dev_info.blksz; + *((DWORD *)buff) = sata_device[host_num].port[port_num].dev_info.blksz; res = RES_OK; break; case CTRL_TRIM: diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h b/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h index d75cb5975ebf505c871ccd42cb80a274e686bcc0..c1d031726955432da0062835079aba2f880879a6 100644 --- a/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h +++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h @@ -80,12 +80,13 @@ #define configUSE_TICK_HOOK 1 #define configMAX_PRIORITIES (8) #define configMINIMAL_STACK_SIZE ((unsigned short)1024) -#define configTOTAL_HEAP_SIZE (1024 * 1024) +#define configTOTAL_HEAP_SIZE (1024 * 1024 * 12) #define configMAX_TASK_NAME_LEN (32) #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 #define configUSE_MUTEXES 1 #define configQUEUE_REGISTRY_SIZE 8 +#define configCHECK_FOR_STACK_OVERFLOW 1 #define configUSE_RECURSIVE_MUTEXES 1 #define configUSE_APPLICATION_TASK_TAG 0 #define configUSE_COUNTING_SEMAPHORES 1 diff --git a/third-party/freertos/queue.c b/third-party/freertos/queue.c index 91bf9e7f7170aac83acd2283e5f5c1468426f8d7..2c4c4166a0c2b11839d9844cee863b5aabd27d49 100644 --- a/third-party/freertos/queue.c +++ b/third-party/freertos/queue.c @@ -253,7 +253,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue; taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); - pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; + pxQueue->uxMessagesWaiting = (UBaseType_t)0U; pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->cRxLock = queueUNLOCKED; @@ -1092,7 +1092,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue; /* Normally a mutex would not be given from an interrupt, especially if there is a mutex holder, as priority inheritance makes no sense for an interrupts, only tasks. */ - configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->pxMutexHolder != NULL ) ) ); + configASSERT(!((pxQueue->uxQueueType == queueQUEUE_IS_MUTEX) && (pxQueue->pxMutexHolder != NULL))); /* RTOS ports that support interrupt nesting have the concept of a maximum system call (or maximum API call) interrupt priority. Interrupts that are diff --git a/third-party/lwip-2.1.2/Kconfig b/third-party/lwip-2.1.2/Kconfig index c6184608b89990260ed6afd080fc037e468b6ee4..4109d99dbf0a8107d7d48f55b8ad668503acb55d 100644 --- a/third-party/lwip-2.1.2/Kconfig +++ b/third-party/lwip-2.1.2/Kconfig @@ -1,16 +1,981 @@ menu "LWIP Configuration" - choice LWIP_GMAC_CTRL_TYPE - prompt "Gmac Drivers" - default LWIP_FGMAC + source "$(FREERTOS_SDK_ROOT)/third-party/lwip-2.1.2/ports/Kconfig" + config LWIP_LOCAL_HOSTNAME + string "Local netif hostname" + default 'phytium' help - Select Gmac Driver for Lwip + The default name this device will report to other devices on the network. - config LWIP_FGMAC - bool "FGMAC" +# Lwip Memory config + menu "memory configuration" + choice LWIP_USE_MEMORY_TYPE + prompt "Select memory type" + default LWIP_USE_MEM_POOL + help + If LWIP_USE_MEM_POOL is selected, MEMP_MEM_MALLOC will be activated. + If LWIP_USE_MEM_HEAP is selected ,lwip memory heap will be activated - config LWIP_FXMAC - select FREERTOS_USE_XMAC - bool "FXMAC" + config LWIP_USE_MEM_POOL + bool "use mem pool" + config LWIP_USE_MEM_HEAP + bool "the size of the heap memory" + endchoice + + if LWIP_USE_MEM_HEAP + config MEM_SIZE + int "Memory pool Size (MB)" + range 1 16 + default 1 + endif + + if LWIP_USE_MEM_POOL + config MEMP_NUM_PBUF + int "the number of memp struct pbufs" + range 16 1024 + default 64 + endif + + config MEM_ALIGNMENT + int "alignment of the CPU" + range 16 1024 + default 64 + + endmenu + +# Network Interfaces options + menu "NETWORK_INTERFACE_OPTIONS" + config LWIP_NETIF_API + bool "Enable usage of standard POSIX APIs in LWIP" + default n + help + If this feature is enabled, standard POSIX APIs: if_indextoname(), if_nametoindex() + could be used to convert network interface index to name + + config LWIP_NETIF_STATUS_CALLBACK + bool "Enable status callback for network interfaces" + default n + help + Enable callbacks when the network interface is up/down and addresses are changed. + + endmenu + +# LOOPIF options + menu "LOOPIF" + menuconfig LWIP_NETIF_LOOPBACK + bool "Support per-interface loopback" + default y + help + Enabling this option means that if a packet is sent with a destination + address equal to the interface's own IP address, it will "loop back" and + be received by this interface. + Disabling this option disables support of loopback interface in lwIP + + config LWIP_LOOPBACK_MAX_PBUFS + int "Max queued loopback packets per interface" + range 0 16 + default 8 + depends on LWIP_NETIF_LOOPBACK + help + Configure the maximum number of packets which can be queued for + loopback on a given interface. Reducing this number may cause packets + to be dropped, but will avoid filling memory with queued packet data. + endmenu +# SLIPIF options + + menu "SLIPIF" + menuconfig LWIP_SLIP_SUPPORT + bool "Enable SLIP support (new/experimental)" + default n + help + Enable SLIP stack. Now only SLIP over serial is possible. + + SLIP over serial support is experimental and unsupported. + + config LWIP_SLIP_DEBUG_ON + bool "Enable SLIP debug log output" + depends on LWIP_SLIP_SUPPORT + default n + help + Enable SLIP debug log output + endmenu + + menu "Pbuf options" + config PBUF_POOL_BUFSIZE + int "the size of each pbuf in the pbuf pool (KB)" + range 2 64 + default 2 + help + 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. + + endmenu + +# Internal Memory Pool Size + + menu "Internal Memory Pool Sizes" + + config PBUF_POOL_SIZE + int "the number of buffers in the pbuf pool (KB)" + default 1 + help + the number of buffers in the pbuf pool. + endmenu + + + config LWIP_MAX_SOCKETS + int "Max number of open sockets" + range 1 16 + default 10 + help + Sockets take up a certain amount of memory, and allowing fewer + sockets to be open at the same time conserves memory. Specify + the maximum amount of sockets here. The valid value is from 1 + to 16. + + menu "LWIP RAW API" + + config LWIP_MAX_RAW_PCBS + int "Maximum LWIP RAW PCBs" + range 1 1024 + default 16 + help + The maximum number of simultaneously active LWIP + RAW protocol control blocks. The practical maximum + limit is determined by available heap memory at runtime. + + endmenu # LWIP RAW API + + + menu "TCP" + + config LWIP_MAX_ACTIVE_TCP + int "Maximum active TCP Connections" + range 1 1024 + default 16 + help + The maximum number of simultaneously active TCP + connections. The practical maximum limit is + determined by available heap memory at runtime. + + Changing this value by itself does not substantially + change the memory usage of LWIP, except for preventing + new TCP connections after the limit is reached. + + config LWIP_MAX_LISTENING_TCP + int "Maximum listening TCP Connections" + range 1 1024 + default 16 + help + The maximum number of simultaneously listening TCP + connections. The practical maximum limit is + determined by available heap memory at runtime. + + Changing this value by itself does not substantially + change the memory usage of LWIP, except for preventing + new listening TCP connections after the limit is reached. + + config LWIP_TCP_HIGH_SPEED_RETRANSMISSION + bool "TCP high speed retransmissions" + default y + help + Speed up the TCP retransmission interval. If disabled, + it is recommended to change the number of SYN retransmissions to 6, + and TCP initial rto time to 3000. + + config LWIP_TCP_MAXRTX + int "Maximum number of retransmissions of data segments" + default 12 + range 3 12 + help + Set maximum number of retransmissions of data segments. + + config LWIP_TCP_SYNMAXRTX + int "Maximum number of retransmissions of SYN segments" + default 6 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION + default 12 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION + range 3 12 + help + Set maximum number of retransmissions of SYN segments. + + config LWIP_TCP_MSS + int "Maximum Segment Size (MSS)" + default 1440 + range 536 1460 + help + Set maximum segment size for TCP transmission. + + Can be set lower to save RAM, the default value 1460(ipv4)/1440(ipv6) will give best throughput. + IPv4 TCP_MSS Range: 576 <= TCP_MSS <= 1460 + IPv6 TCP_MSS Range: 1220<= TCP_mSS <= 1440 + + config LWIP_TCP_TMR_INTERVAL + int "TCP timer interval(ms)" + default 250 + help + Set TCP timer interval in milliseconds. + + Can be used to speed connections on bad networks. + A lower value will redeliver unacked packets faster. + + config LWIP_TCP_MSL + int "Maximum segment lifetime (MSL)" + default 60000 + help + Set maximum segment lifetime in in milliseconds. + + config LWIP_TCP_SND_BUF_DEFAULT + int "Default send buffer size" + default 5744 # 4 * default MSS + range 2440 65535 if !LWIP_WND_SCALE + range 2440 1024000 if LWIP_WND_SCALE + help + Set default send buffer size for new TCP sockets. + + Per-socket send buffer size can be changed at runtime + with lwip_setsockopt(s, TCP_SNDBUF, ...). + + This value must be at least 2x the MSS size, and the default + is 4x the default MSS size. + + Setting a smaller default SNDBUF size can save some RAM, but + will decrease performance. + + config LWIP_TCP_WND_DEFAULT + int "Default receive window size" + default 5744 # 4 * default MSS + range 2440 65535 if !LWIP_WND_SCALE + range 2440 1024000 if LWIP_WND_SCALE + help + Set default TCP receive window size for new TCP sockets. + + Per-socket receive window size can be changed at runtime + with lwip_setsockopt(s, TCP_WINDOW, ...). + + Setting a smaller default receive window size can save some RAM, + but will significantly decrease performance. + + config LWIP_TCP_RECVMBOX_SIZE + int "Default TCP receive mail box size" + default 6 + range 6 64 if !LWIP_WND_SCALE + range 6 1024 if LWIP_WND_SCALE + help + Set TCP receive mail box size. Generally bigger value means higher throughput + but more memory. The recommended value is: LWIP_TCP_WND_DEFAULT/TCP_MSS + 2, e.g. if + LWIP_TCP_WND_DEFAULT=14360, TCP_MSS=1436, then the recommended receive mail box size is + (14360/1436 + 2) = 12. + + TCP receive mail box is a per socket mail box, when the application receives packets + from TCP socket, LWIP core firstly posts the packets to TCP receive mail box and the + application then fetches the packets from mail box. It means LWIP can caches maximum + LWIP_TCP_RECCVMBOX_SIZE packets for each TCP socket, so the maximum possible cached TCP packets + for all TCP sockets is LWIP_TCP_RECCVMBOX_SIZE multiples the maximum TCP socket number. In other + words, the bigger LWIP_TCP_RECVMBOX_SIZE means more memory. + On the other hand, if the receiv mail box is too small, the mail box may be full. If the + mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP + receive mail box is big enough to avoid packet drop between LWIP core and application. + + config LWIP_TCP_QUEUE_OOSEQ + bool "Queue incoming out-of-order segments" + default y + help + Queue incoming out-of-order segments for later use. + + Disable this option to save some RAM during TCP sessions, at the expense + of increased retransmissions if segments arrive out of order. + + config LWIP_TCP_SACK_OUT + bool "Support sending selective acknowledgements" + default n + depends on LWIP_TCP_QUEUE_OOSEQ + help + TCP will support sending selective acknowledgements (SACKs). + + + choice LWIP_TCP_OVERSIZE + prompt "Pre-allocate transmit PBUF size" + default LWIP_TCP_OVERSIZE_MSS + help + Allows enabling "oversize" allocation of TCP transmission pbufs ahead of time, + which can reduce the length of pbuf chains used for transmission. + + This will not make a difference to sockets where Nagle's algorithm + is disabled. + + Default value of MSS is fine for most applications, 25% MSS may save + some RAM when only transmitting small amounts of data. Disabled will + have worst performance and fragmentation characteristics, but uses + least RAM overall. + + config LWIP_TCP_OVERSIZE_MSS + bool "MSS" + config LWIP_TCP_OVERSIZE_QUARTER_MSS + bool "25% MSS" + config LWIP_TCP_OVERSIZE_DISABLE + bool "Disabled" + + endchoice + endmenu # TCP + + menu "UDP" + + config LWIP_MAX_UDP_PCBS + int "Maximum active UDP control blocks" + range 1 1024 + default 16 + help + The maximum number of active UDP "connections" (ie + UDP sockets sending/receiving data). + The practical maximum limit is determined by available + heap memory at runtime. + + config LWIP_UDP_RECVMBOX_SIZE + int "Default UDP receive mail box size" + default 6 + range 6 64 + help + Set UDP receive mail box size. The recommended value is 6. + + UDP receive mail box is a per socket mail box, when the application receives packets + from UDP socket, LWIP core firstly posts the packets to UDP receive mail box and the + application then fetches the packets from mail box. It means LWIP can caches maximum + UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets + for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other + words, the bigger UDP_RECVMBOX_SIZE means more memory. + On the other hand, if the receiv mail box is too small, the mail box may be full. If the + mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP + receive mail box is big enough to avoid packet drop between LWIP core and application. + + + # UDP options + config LWIP_NETBUF_RECVINFO + bool "Enable IP_PKTINFO option" + default n + help + Enabling this option allows checking for the destination address + of a received IPv4 Packet. + + + endmenu # UDP + +# IP options + menu "IPv4" + config USE_IPV4_ONLY + bool "Only use IPv4 packets" + default n + help + If this switch is enabled, ipv6 cannot be used simultaneously + + config LWIP_IP4_REASSEMBLY + bool "Enable reassembly incoming fragmented IP4 packets" + default n + help + Enabling this option allows reassemblying incoming fragmented IP4 packets. + + config LWIP_IP4_FRAG + bool "Enable fragment outgoing IP4 packets" + default y + help + Enabling this option allows fragmenting outgoing IP4 packets if their size + exceeds MTU. + + config LWIP_IP_FORWARD + bool "Enable IP forwarding" + default n + help + Enabling this option allows packets forwarding across multiple interfaces. + + config LWIP_IPV4_NAPT + bool "Enable NAT (new/experimental)" + depends on LWIP_IP_FORWARD + select LWIP_L2_TO_L3_COPY + default n + help + Enabling this option allows Network Address and Port Translation. + + config IP_REASS_MAX_PBUFS + int "Total maximum amount of pbufs waiting to be reassembled" + default 16 + range 1 45 + help + 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! + + endmenu # IP + +# ICMP + menu "ICMP" + + config LWIP_ICMP + bool "ICMP: Enable ICMP" + default y + help + Enable ICMP module for check network stability + + config LWIP_MULTICAST_PING + bool "Respond to multicast pings" + default n + depends on LWIP_ICMP6 || LWIP_ICMP + + config LWIP_BROADCAST_PING + bool "Respond to broadcast pings" + default n + depends on LWIP_ICMP + + endmenu # ICMP + +# DHCP options + menu "DHCP" + config LWIP_DHCP_ENABLE + bool "Enable DHCP module." + default n + + config LWIP_DHCP_DOES_ARP_CHECK + bool "DHCP: Perform ARP check on any offered address" + default y + help + Enabling this option performs a check (via ARP request) if the offered IP address + is not already in use by another host on the network. + + config LWIP_DHCP_GET_NTP_SRV + bool "Request NTP servers from DHCP" + default n + help + If enabled, LWIP will add 'NTP' to Parameter-Request Option sent via DHCP-request. + DHCP server might reply with an NTP server address in option 42. + SNTP callback for such replies should be set accordingly (see sntp_servermode_dhcp() func.) + + config LWIP_DHCP_DISABLE_CLIENT_ID + bool "DHCP: Disable Use of HW address as client identification" + default n + help + This option could be used to disable DHCP client identification with its MAC address. + (Client id is used by DHCP servers to uniquely identify clients and are included + in the DHCP packets as an option 61) + Set this option to "y" in order to exclude option 61 from DHCP packets. + + config LWIP_DHCP_RESTORE_LAST_IP + bool "DHCP: Restore last IP obtained from DHCP server" + default n + help + When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP + server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still + available, there is no need for sending discovery message to DHCP server and save some time. + + config LWIP_DHCP_MAX_NTP_SERVERS + int "Maximum number of NTP servers aquired via DHCP" + default 1 + range 1 16 + depends on LWIP_DHCP_GET_NTP_SRV + help + Set maximum number of NTP servers aquired via DHCP-offer. + Should be less or equal to "Maximum number of NTP servers", any extra servers would be just ignored. + + config LWIP_DHCP_OPTIONS_LEN + int "DHCP total option length" + default 68 if LWIP_DHCP_DISABLE_VENDOR_CLASS_ID + default 108 if !LWIP_DHCP_DISABLE_VENDOR_CLASS_ID + range 68 255 + help + Set total length of outgoing DHCP option msg. Generally bigger value means it can carry more + options and values. If your code meets LWIP_ASSERT due to option value is too long. + Please increase the LWIP_DHCP_OPTIONS_LEN value. + + + config LWIP_DHCP_DISABLE_VENDOR_CLASS_ID + bool "DHCP: Disable Use of vendor class identification" + default y + help + This option could be used to disable DHCP client vendor class identification. + Set this option to "y" in order to exclude option 60 from DHCP packets. + endmenu # DHCP + +# AUTOIP options + + + menu "AUTOIP" + menuconfig LWIP_AUTOIP + bool "Enable IPV4 Link-Local Addressing (AUTOIP)" + default n + help + Enabling this option allows the device to self-assign an address + in the 169.256/16 range if none is assigned statically or via DHCP. + + See RFC 3927. + + config LWIP_AUTOIP_TRIES + int "DHCP Probes before self-assigning IPv4 LL address" + range 1 100 + default 2 + depends on LWIP_AUTOIP + help + DHCP client will send this many probes before self-assigning a + link local address. + + From LWIP help: "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." + + config LWIP_AUTOIP_MAX_CONFLICTS + int "Max IP conflicts before rate limiting" + range 1 100 + default 9 + depends on LWIP_AUTOIP + help + If the AUTOIP functionality detects this many IP conflicts while + self-assigning an address, it will go into a rate limited mode. + + config LWIP_AUTOIP_RATE_LIMIT_INTERVAL + int "Rate limited interval (seconds)" + range 5 120 + default 20 + depends on LWIP_AUTOIP + help + If rate limiting self-assignment requests, wait this long between + each request. + endmenu # AUTOIP + +# DNS options + menu "DNS" + config LWIP_DNS_SUPPORT_MDNS_QUERIES + bool "Enable mDNS queries in resolving host name" + default y + help + If this feature is enabled, standard API such as gethostbyname + support .local addresses by sending one shot multicast mDNS + query + endmenu # DNS + + +# TCP options + menu "TCP options" + config LWIP_TCP_WND_DEFAULT + int "Default receive window size" + default 5744 # 4 * default MSS + range 2440 65535 if !LWIP_WND_SCALE + range 2440 1024000 if LWIP_WND_SCALE + help + Set default TCP receive window size for new TCP sockets. + + Per-socket receive window size can be changed at runtime + with lwip_setsockopt(s, TCP_WINDOW, ...). + + Setting a smaller default receive window size can save some RAM, + but will significantly decrease performance. + + config LWIP_TCP_MAXRTX + int "Maximum number of retransmissions of data segments" + default 12 + range 3 12 + help + Set maximum number of retransmissions of data segments. + + config LWIP_TCP_SYNMAXRTX + int "Maximum number of retransmissions of SYN segments" + default 6 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION + default 12 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION + range 3 12 + help + Set maximum number of retransmissions of SYN segments. + + config LWIP_TCP_QUEUE_OOSEQ + bool "Queue incoming out-of-order segments" + default y + help + Queue incoming out-of-order segments for later use. + + Disable this option to save some RAM during TCP sessions, at the expense + of increased retransmissions if segments arrive out of order. + + + config LWIP_TCP_SACK_OUT + bool "Support sending selective acknowledgements" + default n + depends on LWIP_TCP_QUEUE_OOSEQ + help + TCP will support sending selective acknowledgements (SACKs). + + config LWIP_TCP_MSS + int "Maximum Segment Size (MSS)" + default 1440 + range 536 1460 + help + Set maximum segment size for TCP transmission. + + Can be set lower to save RAM, the default value 1460(ipv4)/1440(ipv6) will give best throughput. + IPv4 TCP_MSS Range: 576 <= TCP_MSS <= 1460 + IPv6 TCP_MSS Range: 1220<= TCP_mSS <= 1440 + + config LWIP_WND_SCALE + bool "Support TCP window scale" + depends on SPIRAM_TRY_ALLOCATE_WIFI_LWIP + default n + help + Enable this feature to support TCP window scaling. + + + config LWIP_TCP_SND_BUF_DEFAULT + int "Default send buffer size" + default 5744 # 4 * default MSS + range 2440 65535 if !LWIP_WND_SCALE + range 2440 1024000 if LWIP_WND_SCALE + help + Set default send buffer size for new TCP sockets. + + Per-socket send buffer size can be changed at runtime + with lwip_setsockopt(s, TCP_SNDBUF, ...). + + This value must be at least 2x the MSS size, and the default + is 4x the default MSS size. + + Setting a smaller default SNDBUF size can save some RAM, but + will decrease performance. + + config LWIP_TCP_RTO_TIME + int "Default TCP rto time" + default 3000 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION + default 1500 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION + help + Set default TCP rto time for a reasonable initial rto. + In bad network environment, recommend set value of rto time to 1500. + endmenu # TCP options + +# Platform specific locking + + config LWIP_TCPIP_CORE_LOCKING + bool "Enable tcpip core locking" + default n + help + If Enable 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(). + + If disable tcpip core locking,TCP IP will perform tasks through context switching. + + +# socket + menu "socket" + config LWIP_SO_LINGER + bool "Enable SO_LINGER processing" + default n + help + Enabling this option allows SO_LINGER processing. + l_onoff = 1,l_linger can set the timeout. + + If l_linger=0, When a connection is closed, TCP will terminate the connection. + This means that TCP will discard any data packets stored in the socket send buffer + and send an RST to the peer. + + If l_linger!=0,Then closesocket() calls to block the process until + the remaining data packets has been sent or timed out. + + config LWIP_SO_REUSE + bool "Enable SO_REUSEADDR option" + default y + help + Enabling this option allows binding to a port which remains in + TIME_WAIT. + + config LWIP_SO_REUSE_RXTOALL + bool "SO_REUSEADDR copies broadcast/multicast to all matches" + depends on LWIP_SO_REUSE + default y + help + Enabling this option means that any incoming broadcast or multicast + packet will be copied to all of the local sockets that it matches + (may be more than one if SO_REUSEADDR is set on the socket.) + + This increases memory overhead as the packets need to be copied, + however they are only copied per matching socket. You can safely + disable it if you don't plan to receive broadcast or multicast + traffic on more than one socket at a time. + endmenu # TCP options + +# Statistics options + config LWIP_STATS + bool "Enable LWIP statistics" + default n + help + Enabling this option allows LWIP statistics + + +# PPP options + menu "PPP" + menuconfig LWIP_PPP_SUPPORT + bool "Enable PPP support (new/experimental)" + default n + help + Enable PPP stack. Now only PPP over serial is possible. + + PPP over serial support is experimental and unsupported. + + config LWIP_PPP_ENABLE_IPV6 + bool "Enable IPV6 support for PPP connections (IPV6CP)" + depends on LWIP_PPP_SUPPORT && LWIP_IPV6 + default y + help + Enable IPV6 support in PPP for the local link between the DTE (processor) and DCE (modem). + There are some modems which do not support the IPV6 addressing in the local link. + If they are requested for IPV6CP negotiation, they may time out. + This would in turn fail the configuration for the whole link. + If your modem is not responding correctly to PPP Phase Network, try to disable IPV6 support. + + config LWIP_IPV6_MEMP_NUM_ND6_QUEUE + int "Max number of IPv6 packets to queue during MAC resolution" + depends on LWIP_IPV6 + range 3 20 + default 3 + help + Config max number of IPv6 packets to queue during MAC resolution. + + config LWIP_IPV6_ND6_NUM_NEIGHBORS + int "Max number of entries in IPv6 neighbor cache" + depends on LWIP_IPV6 + range 3 10 + default 5 + help + Config max number of entries in IPv6 neighbor cache + + config LWIP_PPP_NOTIFY_PHASE_SUPPORT + bool "Enable Notify Phase Callback" + depends on LWIP_PPP_SUPPORT + default n + help + Enable to set a callback which is called on change of the internal PPP state machine. + + config LWIP_PPP_PAP_SUPPORT + bool "Enable PAP support" + depends on LWIP_PPP_SUPPORT + default n + help + Enable Password Authentication Protocol (PAP) support + + config LWIP_PPP_CHAP_SUPPORT + bool "Enable CHAP support" + depends on LWIP_PPP_SUPPORT + default n + help + Enable Challenge Handshake Authentication Protocol (CHAP) support + + config LWIP_PPP_MSCHAP_SUPPORT + bool "Enable MSCHAP support" + depends on LWIP_PPP_SUPPORT + default n + help + Enable Microsoft version of the Challenge-Handshake Authentication Protocol (MSCHAP) support + + config LWIP_PPP_MPPE_SUPPORT + bool "Enable MPPE support" + depends on LWIP_PPP_SUPPORT + default n + help + Enable Microsoft Point-to-Point Encryption (MPPE) support + + config LWIP_ENABLE_LCP_ECHO + bool "Enable LCP ECHO" + depends on LWIP_PPP_SUPPORT + default n + help + Enable LCP echo keepalive requests + + config LWIP_LCP_ECHOINTERVAL + int "Echo interval (s)" + range 0 1000000 + depends on LWIP_ENABLE_LCP_ECHO + default 3 + help + Interval in seconds between keepalive LCP echo requests, 0 to disable. + + config LWIP_LCP_MAXECHOFAILS + int "Maximum echo failures" + range 0 100000 + depends on LWIP_ENABLE_LCP_ECHO + default 3 + help + Number of consecutive unanswered echo requests before failure is indicated. + + config LWIP_PPP_DEBUG_ON + bool "Enable PPP debug log output" + depends on LWIP_PPP_SUPPORT + default n + help + Enable PPP debug log output + endmenu # PPP + +# Checksums + + menu "Checksums" + + config LWIP_CHECKSUM_CHECK_IP + bool "Enable LWIP IP checksums" + default n + help + Enable checksum checking for received IP messages + + config LWIP_CHECKSUM_CHECK_UDP + bool "Enable LWIP UDP checksums" + default n + help + Enable checksum checking for received UDP messages + + config LWIP_CHECKSUM_CHECK_ICMP + bool "Enable LWIP ICMP checksums" + default y + help + Enable checksum checking for received ICMP messages + + endmenu # Checksums + +# ipv6 + menu "ipv6" + config LWIP_IPV6 + bool "Enable IPv6" + default y + help + Enable IPv6 function. If not use IPv6 function, set this option to n. + If disabling LWIP_IPV6 then some other components (coap and asio) will + no longer be available. + + config LWIP_IPV6_AUTOCONFIG + bool "Enable IPV6 stateless address autoconfiguration (SLAAC)" + depends on LWIP_IPV6 + default n + help + Enabling this option allows the devices to IPV6 stateless address autoconfiguration (SLAAC). + + See RFC 4862. + + config LWIP_IPV6_NUM_ADDRESSES + int "Number of IPv6 addresses on each network interface" + depends on LWIP_IPV6 + default 3 + help + The maximum number of IPv6 addresses on each interface. Any additional + addresses will be discarded. + + config LWIP_IPV6_FORWARD + bool "Enable IPv6 forwarding between interfaces" + depends on LWIP_IPV6 + default n + help + Forwarding IPv6 packets between interfaces is only required when acting as + a router. + + config LWIP_IPV6_RDNSS_MAX_DNS_SERVERS + int "Use IPv6 Router Advertisement Recursive DNS Server Option" + depends on LWIP_IPV6_AUTOCONFIG + default 0 + help + 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. + Set this option to a number of desired DNS servers advertised in the RA protocol. + This feature is disabled when set to 0. + + config LWIP_IPV6_DHCP6 + bool "Enable DHCPv6 stateless address autoconfiguration" + depends on LWIP_IPV6_AUTOCONFIG + default n + help + Enable DHCPv6 for IPv6 stateless address autoconfiguration. + Note that the dhcpv6 client has to be started using dhcp6_enable_stateless(netif); + Note that the stateful address autoconfiguration is not supported. + + config LWIP_IP6_FRAG + bool "Enable fragment outgoing IP6 packets" + default y + depends on LWIP_IPV6 + help + Enabling this option allows fragmenting outgoing IP6 packets if their size + exceeds MTU. + + config LWIP_IP6_REASSEMBLY + bool "Enable reassembly incoming fragmented IP6 packets" + default n + depends on LWIP_IPV6 + help + Enabling this option allows reassemblying incoming fragmented IP6 packets. + endmenu + + + +#defbug + + menuconfig LWIP_DEBUG + bool "Enable LWIP Debug" + default n + help + Enabling this option allows different kinds of lwIP debug output. + + All lwIP debug features increase the size of the final binary. + + config LWIP_NETIF_DEBUG + bool "Enable netif debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_PBUF_DEBUG + bool "Enable pbuf debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_ETHARP_DEBUG + bool "Enable etharp debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_API_LIB_DEBUG + bool "Enable api lib debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_SOCKETS_DEBUG + bool "Enable socket debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_IP_DEBUG + bool "Enable IP debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_ICMP_DEBUG + bool "Enable ICMP debug messages" + depends on LWIP_DEBUG && LWIP_ICMP + default n + + config LWIP_DHCP_DEBUG + bool "Enable DHCP debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_IP6_DEBUG + bool "Enable IP6 debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_ICMP6_DEBUG + bool "Enable ICMP6 debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_TCP_DEBUG + bool "Enable TCP debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_SNTP_DEBUG + bool "Enable SNTP debug messages" + depends on LWIP_DEBUG + default n + + config LWIP_DNS_DEBUG + bool "Enable DNS debug messages" + depends on LWIP_DEBUG + default n + + endmenu - endchoice # LWIP_GMAC_CTRL_TYPE -endmenu \ No newline at end of file diff --git a/third-party/lwip-2.1.2/core/ipv4/icmp.c b/third-party/lwip-2.1.2/core/ipv4/icmp.c index a462ccd34cd74b0bad461bb90439e0e6dfa3bce6..9dcdf6c8e4bcb145b45eb1a73cea93023bc470f5 100644 --- a/third-party/lwip-2.1.2/core/ipv4/icmp.c +++ b/third-party/lwip-2.1.2/core/ipv4/icmp.c @@ -167,7 +167,7 @@ icmp_input(struct pbuf *p, struct netif *inp) /* allocate new packet buffer with space for link headers */ r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM); if (r == NULL) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed alloc_len is %d \n",alloc_len)); goto icmperr; } if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { diff --git a/third-party/lwip-2.1.2/core/netif.c b/third-party/lwip-2.1.2/core/netif.c index ff7ae0110f51447347da7e3ddb134da338bf29d5..bed144002161fc43b2185f27ae0f4b5c03dd9825 100644 --- a/third-party/lwip-2.1.2/core/netif.c +++ b/third-party/lwip-2.1.2/core/netif.c @@ -468,6 +468,9 @@ netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *ol ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); + + + netif_do_ip_addr_changed(old_addr, &new_addr); mib2_remove_ip4(netif); @@ -479,14 +482,12 @@ netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *ol mib2_add_route_ip4(0, netif); netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); - - 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_ip_addr4(netif)), - ip4_addr2_16(netif_ip_addr4(netif)), - ip4_addr3_16(netif_ip_addr4(netif)), - ip4_addr4_16(netif_ip_addr4(netif)))); - + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE, ("netif_do_set_ipaddr: ip 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)))); NETIF_STATUS_CALLBACK(netif); return 1; /* address changed */ } diff --git a/third-party/lwip-2.1.2/include/lwip/opt.h b/third-party/lwip-2.1.2/include/lwip/opt.h index 43b695cab532d0d3b3159c6f5ec45370b7d92886..d34cb8993893893d2207706bf77fd40692aa11e5 100644 --- a/third-party/lwip-2.1.2/include/lwip/opt.h +++ b/third-party/lwip-2.1.2/include/lwip/opt.h @@ -187,7 +187,7 @@ * 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 +#define LWIP_TCPIP_CORE_LOCKING 0 #endif /** diff --git a/third-party/lwip-2.1.2/ports/Kconfig b/third-party/lwip-2.1.2/ports/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..6ca6acacf3e95803f65187dd638f260cdfc52648 --- /dev/null +++ b/third-party/lwip-2.1.2/ports/Kconfig @@ -0,0 +1,22 @@ +menu "LWIP Port Configuration" + + choice LWIP_GMAC_CTRL_TYPE + prompt "Gmac Drivers" + default LWIP_FGMAC + help + Select Gmac Driver for Lwip + + config LWIP_FGMAC + bool "FGMAC" + + config LWIP_FXMAC + select FREERTOS_USE_XMAC + bool "FXMAC" + + endchoice # LWIP_GMAC_CTRL_TYPE + + # add thread configuration + + + +endmenu \ No newline at end of file diff --git a/third-party/lwip-2.1.2/ports/fgmac/lwip_port.c b/third-party/lwip-2.1.2/ports/fgmac/lwip_port.c index 569ce617cdcf0b88e976e48b96be279a972033cf..c44e484c604d29f3eb6a85df367b7440d407a5ae 100644 --- a/third-party/lwip-2.1.2/ports/fgmac/lwip_port.c +++ b/third-party/lwip-2.1.2/ports/fgmac/lwip_port.c @@ -116,7 +116,7 @@ struct netif *lwip_port_add(struct netif *netif, /* initialize based on MAC type */ return netif_add(netif, #if LWIP_IPV4 - ipaddr, netmask, gw, + (const ip4_addr_t *)ipaddr, netmask, gw, #endif (void*)(uintptr)mac_id, diff --git a/third-party/lwip-2.1.2/ports/fxmac/arch/sys_arch.c b/third-party/lwip-2.1.2/ports/fxmac/arch/sys_arch.c index 76efc3fd5c958dc98caed11414337a1bd8bf96bf..e05ef8093adce14eb78fcfd7da1f44a4986125d6 100644 --- a/third-party/lwip-2.1.2/ports/fxmac/arch/sys_arch.c +++ b/third-party/lwip-2.1.2/ports/fxmac/arch/sys_arch.c @@ -36,6 +36,8 @@ int errno; #endif +extern int isr_calling_flg ; + /*-----------------------------------------------------------------------------------*/ // Creates an empty mailbox. err_t sys_mbox_new(sys_mbox_t *mbox, int size) @@ -84,10 +86,21 @@ void sys_mbox_free(sys_mbox_t *mbox) // Posts the "msg" to the mailbox. void sys_mbox_post(sys_mbox_t *mbox, void *data) { + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if (*mbox == NULL) return; - xQueueSendToBack(*mbox, &data, portMAX_DELAY); + if(isr_calling_flg != 0) + { + xQueueSendToBackFromISR( *mbox, &data, &xHigherPriorityTaskWoken ); + if (xHigherPriorityTaskWoken == pdTRUE) { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + xQueueSendToBack(*mbox, &data, portMAX_DELAY); + } } /*-----------------------------------------------------------------------------------*/ @@ -95,23 +108,38 @@ void sys_mbox_post(sys_mbox_t *mbox, void *data) err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { err_t result; + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if (*mbox == NULL) return ERR_MEM; - if (xQueueSend(*mbox, &msg, 0) == pdTRUE) + if(isr_calling_flg != 0) { - result = ERR_OK; + result = xQueueSendFromISR( *mbox, &msg, &xHigherPriorityTaskWoken ); + if(xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } } else { -#if SYS_STATS - lwip_stats.sys.mbox.err++; -#endif /* SYS_STATS */ - // could not post, queue must be full - result = ERR_MEM; + result = xQueueSend( *mbox, &msg, ( portTickType ) 0 ); } + if( result == pdPASS ) + { + result = ERR_OK; + } + else + { + printf("Queue is full\r\n"); + /* The queue was already full. */ + result = ERR_MEM; + #if SYS_STATS + lwip_stats.sys.mbox.err++; + #endif /* SYS_STATS */ + } + return result; } @@ -163,13 +191,17 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) BaseType_t err; - portTickType StartTime, EndTime, Elapsed; + portTickType xStartTime, xEndTime, xElapsed; + unsigned long ulReturn; + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; - StartTime = xTaskGetTickCount(); + xStartTime = xTaskGetTickCount(); if (*mbox == NULL) + { return SYS_ARCH_TIMEOUT; - + } + if (msg == NULL) { msg = &dummyptr; @@ -177,34 +209,83 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) if (timeout != 0) { - if (pdTRUE == xQueueReceive(*mbox, &(*msg), timeout / portTICK_RATE_MS)) - { - EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - return (Elapsed); + if(isr_calling_flg != 0) + { + if( pdTRUE == xQueueReceiveFromISR( *mbox, &( *msg ), &xHigherPriorityTaskWoken ) ) + { + xEndTime = xTaskGetTickCount(); + xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + ulReturn = xElapsed; + if (xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + *msg = NULL; + ulReturn = SYS_ARCH_TIMEOUT; + } } - else // timed out blocking for message + else { - *msg = NULL; - - return SYS_ARCH_TIMEOUT; + if( pdTRUE == xQueueReceive( *mbox, &( *msg ), timeout / portTICK_RATE_MS ) ) + { + xEndTime = xTaskGetTickCount(); + xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + + ulReturn = xElapsed; + } + else + { + /* Timed out. */ + *msg = NULL; + ulReturn = SYS_ARCH_TIMEOUT; + } } + } else // block forever for a message. { - err = xQueueReceive(*mbox, &(*msg), portMAX_DELAY); - if (pdTRUE != err) + if(isr_calling_flg != 0) { - LWIP_ASSERT("sys_arch_mbox_fetch xQueueReceive returned with error!", err == pdTRUE); + xQueueReceiveFromISR(*mbox, &(*msg), &xHigherPriorityTaskWoken); + if(xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } } + else + { + xQueueReceive(*mbox, &(*msg), portMAX_DELAY); + } + + xEndTime = xTaskGetTickCount(); + xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; - EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + if( xElapsed == 0UL ) + { + xElapsed = 1UL; + } - return (Elapsed); // return time blocked TODO test + ulReturn = xElapsed; + + + // err = xQueueReceive(*mbox, &(*msg), portMAX_DELAY); + + // if (pdTRUE != err) + // { + // LWIP_ASSERT("sys_arch_mbox_fetch xQueueReceive returned with error!", err == pdTRUE); + // } + + // EndTime = xTaskGetTickCount(); + // Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + + // return (Elapsed); // return time blocked TODO test } + return ulReturn; } /*-----------------------------------------------------------------------------------*/ @@ -214,24 +295,52 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) */ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) { - void *dummyptr; - - if (*mbox == NULL) - return SYS_ARCH_TIMEOUT; - - if (msg == NULL) - { - msg = &dummyptr; - } - - if (pdTRUE == xQueueReceive(*mbox, &(*msg), 0)) - { - return ERR_OK; - } - else - { - return SYS_MBOX_EMPTY; - } + void *dummyptr; + long lResult; + unsigned long ulReturn; + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; + if (*mbox == NULL) + { + return SYS_ARCH_TIMEOUT; + } + + if (msg == NULL) + { + msg = &dummyptr; + } + + if(isr_calling_flg != 0) + { + lResult = xQueueReceiveFromISR( *mbox, &( *msg ), &xHigherPriorityTaskWoken ); + if (xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + lResult = xQueueReceive( *mbox, &( *msg ), 0UL ); + } + + if( lResult == pdPASS ) + { + ulReturn = ERR_OK; + } + else + { + ulReturn = SYS_MBOX_EMPTY; + } + + return ulReturn; + +// if (pdTRUE == xQueueReceive(*mbox, &(*msg), 0)) +// { +// return ERR_OK; +// } +// else +// { +// return SYS_MBOX_EMPTY; +// } } /*----------------------------------------------------------------------------------*/ int sys_mbox_valid(sys_mbox_t *mbox) @@ -297,66 +406,137 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count) u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) { - portTickType StartTime, EndTime, Elapsed; - + portTickType xStartTime, xEndTime, xElapsed; + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; BaseType_t err; + unsigned long ulReturn; - StartTime = xTaskGetTickCount(); + xStartTime = xTaskGetTickCount(); if (*sem == NULL) return SYS_ARCH_TIMEOUT; if (timeout != 0) { - if (xSemaphoreTake(*sem, timeout / portTICK_RATE_MS) == pdTRUE) - { - EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - return (Elapsed); // return time blocked TODO test - } - else - { - return SYS_ARCH_TIMEOUT; - } + if(isr_calling_flg != 0) + { + if( xSemaphoreTakeFromISR( *sem, &xHigherPriorityTaskWoken ) == pdTRUE ) + { + xEndTime = xTaskGetTickCount(); + xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS; + ulReturn = xElapsed; + if (xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + ulReturn = SYS_ARCH_TIMEOUT; + } + } + else + { + if (xSemaphoreTake(*sem, timeout / portTICK_RATE_MS) == pdTRUE) + { + xEndTime = xTaskGetTickCount(); + xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS; + + return (xElapsed); // return time blocked TODO test + } + else + { + return SYS_ARCH_TIMEOUT; + } + } + + // if (xSemaphoreTake(*sem, timeout / portTICK_RATE_MS) == pdTRUE) + // { + // EndTime = xTaskGetTickCount(); + // Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + + // return (Elapsed); // return time blocked TODO test + // } + // else + // { + // return SYS_ARCH_TIMEOUT; + // } } else // must block without a timeout { - - err = xSemaphoreTake(*sem, portMAX_DELAY); - - if (pdTRUE != err) - { - LWIP_ASSERT("sys_arch_mbox_fetch xQueueReceive returned with error!", err == pdTRUE); - } - - EndTime = xTaskGetTickCount(); - Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; - - return (Elapsed); // return time blocked + + if(isr_calling_flg != 0) + { + xSemaphoreTakeFromISR( *sem, &xHigherPriorityTaskWoken ); + if (xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + xSemaphoreTake(*sem, portMAX_DELAY); + } + + xEndTime = xTaskGetTickCount(); + xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS; + + if( xElapsed == 0UL ) + { + xElapsed = 1UL; + } + + ulReturn = xElapsed; + + // err = xSemaphoreTake(*sem, portMAX_DELAY); + + // if (pdTRUE != err) + // { + // LWIP_ASSERT("sys_arch_mbox_fetch xQueueReceive returned with error!", err == pdTRUE); + // } + + // EndTime = xTaskGetTickCount(); + // Elapsed = (EndTime - StartTime) * portTICK_RATE_MS; + + // return (Elapsed); // return time blocked } + return ulReturn ; } /*-----------------------------------------------------------------------------------*/ // Signals a semaphore void sys_sem_signal(sys_sem_t *sem) { - +portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if (*sem == NULL) return; - xSemaphoreGive(*sem); + if(isr_calling_flg != 0) + { + xSemaphoreGiveFromISR( *sem, &xHigherPriorityTaskWoken ); + if (xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + xSemaphoreGive(*sem); + } + } -void sys_sem_signal_fromisr(sys_sem_t *sem) -{ - portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; - if (*sem == NULL) - return; +// void sys_sem_signal_fromisr(sys_sem_t *sem) +// { +// printf("sys_sem_signal_fromisr is here \r\n") ; +// portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; +// if (*sem == NULL) +// return; - xSemaphoreGiveFromISR(*sem,&xHigherPriorityTaskWoken); -} +// xSemaphoreGiveFromISR(*sem,&xHigherPriorityTaskWoken); +// } /*-----------------------------------------------------------------------------------*/ // Deallocates a semaphore @@ -408,6 +588,8 @@ err_t sys_mutex_new(sys_mutex_t *mutex) *mutex = xSemaphoreCreateMutex(); + // vSemaphoreCreateBinary(*mutex); + if (*mutex == NULL) { #if SYS_STATS @@ -440,20 +622,42 @@ void sys_mutex_free(sys_mutex_t *mutex) /* Lock a mutex*/ void sys_mutex_lock(sys_mutex_t *mutex) { - if (*mutex == NULL) - return; - - sys_arch_sem_wait(mutex, 0); + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; + if (*mutex == NULL) + return; + if(isr_calling_flg != 0) + { + xSemaphoreTakeFromISR( *mutex, &xHigherPriorityTaskWoken ); + if (xHigherPriorityTaskWoken == pdTRUE) + { + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + } + else + { + sys_arch_sem_wait(mutex, 0); + } } /*-----------------------------------------------------------------------------------*/ /* Unlock a mutex*/ void sys_mutex_unlock(sys_mutex_t *mutex) { - if (*mutex == NULL) - return; + portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; + if (*mutex == NULL) + return; + + if(isr_calling_flg != 0) + { + xSemaphoreGiveFromISR( *mutex, &xHigherPriorityTaskWoken ); + if (xHigherPriorityTaskWoken == pdTRUE) + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + } + else + { + xSemaphoreGive(*mutex); + } - xSemaphoreGive(*mutex); } #endif /*LWIP_COMPAT_MUTEX*/ /*-----------------------------------------------------------------------------------*/ @@ -501,7 +705,15 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, */ sys_prot_t sys_arch_protect(void) { - // vPortEnterCritical(); + if(isr_calling_flg != 0) + { + + } + else + { + vPortEnterCritical(); + } + return 1; } @@ -517,7 +729,14 @@ sys_prot_t sys_arch_protect(void) void sys_arch_unprotect(sys_prot_t pval) { (void)pval; -// vPortExitCritical(); + if(isr_calling_flg != 0) + { + + } + else + { + vPortExitCritical(); + } } void sys_arch_assert(const char *file, int line) diff --git a/third-party/lwip-2.1.2/ports/fxmac/ethernetif.c b/third-party/lwip-2.1.2/ports/fxmac/ethernetif.c index cb6e48ded02adb6091ecdb1359a1d70c6a9d34a6..fb2161b01111d77566b1887913f0c65d7e7ff20b 100644 --- a/third-party/lwip-2.1.2/ports/fxmac/ethernetif.c +++ b/third-party/lwip-2.1.2/ports/fxmac/ethernetif.c @@ -132,7 +132,7 @@ void ethernetif_input(struct netif *netif) struct pbuf *p; SYS_ARCH_DECL_PROTECT(lev); -#if NO_SYS == 0 +#if !NO_SYS while (1) #endif { @@ -210,7 +210,6 @@ static err_t low_level_init(struct netif *netif) #if !NO_SYS sys_sem_new(&xmac_netif_p->sem_rx_data_available, 0); - printf("sem_rx_data_available is %p \r\n",xmac_netif_p->sem_rx_data_available); #endif /* obtain config of this emac */ FXMAC_LWIP_NET_PRINT_I("netif->state is %p \r\n ",netif->state); @@ -246,10 +245,13 @@ static err_t low_level_init(struct netif *netif) { instance_p->hwaddr[i] = netif->hwaddr[i]; } - + +#if LWIP_IPV6 + instance_p->config = FXMAC_OS_CONFIG_COPY_ALL_FRAMES; +#endif + ret = FXmacOsInit(instance_p); - if (ret != FT_SUCCESS) { FXMAC_LWIP_NET_PRINT_E("FXmacOsInit is error\r\n"); @@ -270,11 +272,20 @@ static err_t low_level_init(struct netif *netif) { netif->mtu = FXMAC_MTU - FXMAC_HDR_SIZE; } - netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; + + #if LWIP_IPV6 && LWIP_IPV6_MLD + netif->flags |= NETIF_FLAG_MLD6; + #endif + + #if LWIP_IGMP + netif->flags |= NETIF_FLAG_IGMP; + #endif + + FXMAC_LWIP_NET_PRINT_I("ready to leave netif \r\n"); return ERR_OK; } @@ -314,6 +325,11 @@ err_t ethernetif_init(struct netif *netif) netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; +#if LWIP_NETIF_HOSTNAME + /* Initialize interface hostname */ + netif->hostname = "lwip"; +#endif /* LWIP_NETIF_HOSTNAME */ + #if LWIP_IPV4 #if LWIP_ARP || LWIP_ETHERNET #if LWIP_ARP diff --git a/third-party/lwip-2.1.2/ports/fxmac/lwip_port.c b/third-party/lwip-2.1.2/ports/fxmac/lwip_port.c index 56b5ec4ccbc5e7fbf7630ba18cce1f480d06ec21..aa8a246616f925390c56fef0349ae9284a5af55c 100644 --- a/third-party/lwip-2.1.2/ports/fxmac/lwip_port.c +++ b/third-party/lwip-2.1.2/ports/fxmac/lwip_port.c @@ -70,7 +70,7 @@ #define LWIP_PORT_WARN(format, ...) FT_DEBUG_PRINT_W(LWIP_PORT_DEBUG_TAG, format, ##__VA_ARGS__) -#if NO_SYS == 0 +#if !NO_SYS #define THREAD_STACKSIZE 256 #define LINK_DETECT_THREAD_INTERVAL 1000 /* one second */ @@ -98,13 +98,13 @@ struct netif *lwip_port_add(struct netif *netif, user_config *user_config) { int i; - + struct netif * netif_p ; if(user_config->magic_code != LWIP_PORT_CONFIG_MAGIC_CODE) { printf("user_config is illegitmacy \r\n"); return NULL; } -#if NO_SYS == 0 +#if !NO_SYS /* Start thread to detect link periodically for Hot Plug autodetect */ sys_thread_new("link_detect_thread", link_detect_thread, netif, THREAD_STACKSIZE, tskIDLE_PRIORITY); @@ -118,8 +118,10 @@ struct netif *lwip_port_add(struct netif *netif, netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; /* initialize based on MAC type */ - return netif_add(netif, -#if LWIP_IPV4 + netif_p = netif_add(netif, +#if LWIP_IPV4 && LWIP_IPV6 + &ipaddr->u_addr.ip4, &netmask->u_addr.ip4, &gw->u_addr.ip4, +#elif LWIP_IPV4 ipaddr, netmask, gw, #endif (void*)(uintptr)user_config, @@ -130,7 +132,9 @@ struct netif *lwip_port_add(struct netif *netif, tcpip_input #endif ); + + return netif_p ; } #if !NO_SYS @@ -160,8 +164,6 @@ void lwip_port_input(struct netif *netif) ethernetif_input(netif); } -#if defined(CONFIG_LWIP_FXMAC) - extern enum ethernet_link_status FXmacPhyReconnect(struct LwipPort *xmac_netif_p); void lwip_port_link_detect(struct netif *netif) @@ -202,7 +204,7 @@ void lwip_port_link_detect(struct netif *netif) } -#if NO_SYS == 0 +#if !NO_SYS void link_detect_thread(void *p) { @@ -217,7 +219,6 @@ void link_detect_thread(void *p) } } - #endif @@ -236,125 +237,10 @@ void lwip_port_stop(struct netif *netif) enum ethernet_link_status link_status; struct ethernetif *mac_netif = (struct ethernetif *)(netif->state); - -} - - -#else - -static u32 phy_link_detect(FGmac *instance_p, u32 phy_addr) -{ - u16 status; - - /* Read Phy Status register twice to get the confirmation of the current - * link status. - */ - FGmacReadPhyReg(instance_p, instance_p->phy_addr, FGMAC_PHY_MII_STATUS_REG, &status); - FGmacReadPhyReg(instance_p, instance_p->phy_addr, FGMAC_PHY_MII_STATUS_REG, &status); - - if (status & FGMAC_PHY_MII_SR_LSTATUS) - return 1; - return 0; -} - -static u32 phy_autoneg_status(FGmac *instance_p, u32 phy_addr) -{ - u16 status; - - /* Read Phy Status register twice to get the confirmation of the current - * link status. - */ - FGmacReadPhyReg(instance_p, instance_p->phy_addr, FGMAC_PHY_MII_STATUS_REG, &status); - FGmacReadPhyReg(instance_p, instance_p->phy_addr, FGMAC_PHY_MII_STATUS_REG, &status); - - if (status & FGMAC_PHY_MII_SR_AUTO_NEGOT_COMPLETE) - return 1; - return 0; -} - -void lwip_port_link_detect(struct netif *netif) -{ - u32 link_speed, phy_link_status; - enum ethernet_link_status link_status; - - struct ethernetif *mac_netif = (struct ethernetif *)(netif->state); - FGmac *instance_p = mac_netif->ethctrl; - - if (instance_p->is_ready != FT_COMPONENT_IS_READY) - { - LWIP_PORT_ERROR("instance_p is not ready\n"); - return; - } - - /* read gmac phy link status */ - phy_link_status = phy_link_detect(instance_p, instance_p->phy_addr); - link_status = phy_link_status ? ETH_LINK_UP : ETH_LINK_DOWN; - - /* if the link status is changed */ - if(eth_link_status != link_status) - eth_link_status = link_status; - else - return; - - switch (eth_link_status) - { - case ETH_LINK_UP: - if (phy_link_status && phy_autoneg_status(instance_p, instance_p->phy_addr)) - { - netif_set_link_up(netif); - eth_link_status = ETH_LINK_UP; - LWIP_PORT_DEBUG("Ethernet Link up\r\n"); - } - break; - case ETH_LINK_DOWN: - netif_set_link_down(netif); - LWIP_PORT_DEBUG("Ethernet Link down\r\n"); - break; - default: - break; - } - - return; -} - - -void lwip_port_start(struct netif *netif) -{ - u32 link_speed, phy_link_status; - enum ethernet_link_status link_status; - - struct ethernetif *mac_netif = (struct ethernetif *)(netif->state); - FGmac *instance_p = mac_netif->ethctrl; - - if (instance_p->is_ready != FT_COMPONENT_IS_READY) - { - LWIP_PORT_ERROR("instance_p is not ready\n"); - return; - } - - FGmacStartTrans(instance_p); -} - -void lwip_port_stop(struct netif *netif) -{ - u32 link_speed, phy_link_status; - enum ethernet_link_status link_status; - - struct ethernetif *mac_netif = (struct ethernetif *)(netif->state); - FGmac *instance_p = mac_netif->ethctrl; - - if (instance_p->is_ready != FT_COMPONENT_IS_READY) - { - LWIP_PORT_ERROR("instance_p is not ready\n"); - return; - } - - FGmacStopTrans(instance_p); } -#endif - +/* gCpuRuntime value from freertos_configs.c */ extern volatile unsigned int gCpuRuntime; u32_t sys_now(void) diff --git a/third-party/lwip-2.1.2/ports/fxmac/lwipopts.h b/third-party/lwip-2.1.2/ports/fxmac/lwipopts.h deleted file mode 100644 index b896978478d9ef478d7607de2a59befc4dba4a3b..0000000000000000000000000000000000000000 --- a/third-party/lwip-2.1.2/ports/fxmac/lwipopts.h +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright : (C) 2022 Phytium Information Technology, Inc. - * All Rights Reserved. - * - * This program is OPEN SOURCE software: you can redistribute it and/or modify it - * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, - * either version 1.0 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the Phytium Public License for more details. - * - * - * FilePath: lwipopts.h - * Date: 2022-07-26 14:36:52 - * LastEditTime: 2022-07-26 14:36:53 - * Description: This file is for - * - * Modify History: - * Ver Who Date Changes - * ----- ------ -------- -------------------------------------- - */ -/* - * Copyright : (C) 2022 Phytium Information Technology, Inc. - * All Rights Reserved. - * - * This program is OPEN SOURCE software: you can redistribute it and/or modify it - * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, - * either version 1.0 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the Phytium Public License for more details. - * - * - * FilePath: lwipopts.h - * Date: 2022-07-11 11:26:00 - * LastEditTime: 2022-07-11 11:26:01 - * Description: This file is for - * - * Modify History: - * Ver Who Date Changes - * ----- ------ -------- -------------------------------------- - */ - - -#ifndef __LWIPOPTS_H_ -#define __LWIPOPTS_H_ - -#ifndef PROCESSOR_LITTLE_ENDIAN -#define PROCESSOR_LITTLE_ENDIAN -#endif - - -#include "sdkconfig.h" -#ifndef SDK_CONFIG_H__ - #warning "Please include sdkconfig.h" -#endif - -#include "arch/sys_arch.h" - -#define LWIP_PROVIDE_ERRNO 1 //使用errno -#define LWIP_RAW 1 - -#ifdef CONFIG_LWIP_IPV4_TEST -#define LWIP_IPV4 1 -#define LWIP_IPV6 0 -#define LWIP_IPV6_MLD 0 -/* ---------- DHCP options ---------- */ -/* Define LWIP_DHCP to 1 if you want DHCP configuration of - interfaces. */ -#define LWIP_DHCP 0 /*LWIP_UDP*/ -#endif - -#ifdef CONFIG_LWIP_IPV4_DHCP_TEST -#define LWIP_IPV4 1 -#define LWIP_IPV6 0 -#define LWIP_IPV6_MLD 0 -/* ---------- DHCP options ---------- */ -/* Define LWIP_DHCP to 1 if you want DHCP configuration of - interfaces. */ -#define LWIP_DHCP 1 /*LWIP_UDP*/ -#endif - -#ifdef CONFIG_LWIP_IPV6_TEST -#define LWIP_IPV4 0 -#define LWIP_IPV6 1 -#define LWIP_IPV6_MLD 0 -/* ---------- DHCP options ---------- */ -/* Define LWIP_DHCP to 1 if you want DHCP configuration of - interfaces. */ -#define LWIP_DHCP 0 /*LWIP_UDP*/ -#define IPV6_FRAG_COPYHEADER 1 -#endif - -#define NO_SYS 0 - -/** 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. - */ -#define SYS_LIGHTWEIGHT_PROT (NO_SYS == 0) - -#define LWIP_SOCKET (NO_SYS==0) -#define LWIP_NETCONN (NO_SYS==0) -#define LWIP_NETIF_API (NO_SYS==0) -#define LWIP_DNS (NO_SYS==0) - - -/** - * 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); - */ -#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 - - - -/** - * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and - * SO_RCVTIMEO processing. --ping example - */ -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_RCVBUF 1 - -#define NO_SYS_NO_TIMERS 0 - -#define LWIP_TCP_KEEPALIVE 0 - -#define MEM_ALIGNMENT 64 /* 设置为编译LwIP的CPU的对齐方式 */ -/* 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. */ -#define MEM_SIZE ( 1024 * 1024) -/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application - sends a lot of data out of ROM (or other static memory), this - should be set high. */ -#define MEMP_NUM_PBUF 64 /* */ -/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One - per active UDP "connection". */ -#define MEMP_NUM_UDP_PCB 6 -/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP - connections. */ -#define MEMP_NUM_TCP_PCB 32 -/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP - connections. */ -#define MEMP_NUM_TCP_PCB_LISTEN 8 -/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP - segments. */ -#define MEMP_NUM_TCP_SEG 256 -/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active - timeouts. */ -#define MEMP_NUM_SYS_TIMEOUT 8 -/* The following four are used only with the sequential API and can be - set to 0 if the application only will use the raw API. */ -/* MEMP_NUM_NETBUF: the number of struct netbufs. */ -#define MEMP_NUM_NETBUF 8 -/* MEMP_NUM_NETCONN: the number of struct netconns. */ -#define MEMP_NUM_NETCONN 16 -/* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used - for sequential API communication and incoming packets. Used in - src/api/tcpip.c. */ -#define MEMP_NUM_TCPIP_MSG_API 16 -#define MEMP_NUM_TCPIP_MSG_INPKT 64 -#define DEFAULT_RAW_RECVMBOX_SIZE 4 - -/* ---------- Pbuf options ---------- */ -/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#define PBUF_POOL_SIZE (2 * 1024) /* pbuf tests need ~200KByte */ -/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ -#define PBUF_POOL_BUFSIZE (2 * 1024) /* this parameter need over xmac rx_buf_size*/ -#define PBUF_LINK_HLEN 16 - -#define ARP_TABLE_SIZE 10 -#define ARP_QUEUEING 1 - -#define ICMP_TTL 255 - -#define IP_OPTIONS 0 -#define IP_FORWARD 0 -#define IP_REASSEMBLY 1 -#define IP_FRAG 1 -#define IP_REASS_MAX_PBUFS 128 -#define IP_DEFAULT_TTL 255 -#define LWIP_CHKSUM_ALGORITHM 3 - -#define LWIP_UDP 1 -#define UDP_TTL 255 - -/* ---------- TCP options ---------- */ -#define LWIP_TCP 1 -#define TCP_MSS 1460 -#define TCP_SND_BUF 8192 -#define TCP_WND 2048 -#define TCP_TTL 255 -#define TCP_MAXRTX 12 -#define TCP_SYNMAXRTX 4 -#define TCP_QUEUE_OOSEQ 1 -#define TCP_SND_QUEUELEN 16 * TCP_SND_BUF/TCP_MSS - -#define LWIP_FULL_CSUM_OFFLOAD_RX 1 -#define LWIP_FULL_CSUM_OFFLOAD_TX 1 - -#define MEMP_SEPARATE_POOLS 1 -#define MEMP_NUM_FRAG_PBUF 256 -#define IP_OPTIONS_ALLOWED 0 -#define TCP_OVERSIZE TCP_MSS -/* 1 if you want to do an ARP check on the offered address - (recommended). */ -#define DHCP_DOES_ARP_CHECK 0 - -#define CONFIG_LINKSPEED_AUTODETECT 1 - -#define LWIP_DEBUG - -#define ETHARP_DEBUG LWIP_DBG_OFF - -#ifdef LWIP_DEBUG -#define PPP_DEBUG LWIP_DBG_OFF -#define MEM_DEBUG LWIP_DBG_OFF -#define MEMP_DEBUG LWIP_DBG_OFF -#define PBUF_DEBUG LWIP_DBG_OFF -#define API_LIB_DEBUG LWIP_DBG_OFF -#define API_MSG_DEBUG LWIP_DBG_OFF -#define TCPIP_DEBUG LWIP_DBG_OFF -#define SOCKETS_DEBUG LWIP_DBG_OFF -#define DNS_DEBUG LWIP_DBG_OFF -#define AUTOIP_DEBUG LWIP_DBG_OFF -#define IP_DEBUG LWIP_DBG_OFF -#define IP_REASS_DEBUG LWIP_DBG_OFF -#define ICMP_DEBUG LWIP_DBG_OFF -#define IGMP_DEBUG LWIP_DBG_OFF -#define UDP_DEBUG LWIP_DBG_OFF -#define TCP_DEBUG LWIP_DBG_OFF -#define TCP_INPUT_DEBUG LWIP_DBG_OFF -#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF -#define TCP_RTO_DEBUG LWIP_DBG_OFF -#define TCP_CWND_DEBUG LWIP_DBG_OFF -#define TCP_WND_DEBUG LWIP_DBG_OFF -#define TCP_FR_DEBUG LWIP_DBG_OFF -#define TCP_QLEN_DEBUG LWIP_DBG_OFF -#define TCP_RST_DEBUG LWIP_DBG_OFF -#endif - -#define NETIF_DEBUG LWIP_DBG_ON -#define DHCP_DEBUG LWIP_DBG_ON - -#define LWIP_TCPIP_CORE_LOCKING 1 - - -#define CHECKSUM_GEN_IP 1 -#define CHECKSUM_GEN_UDP 1 -#define CHECKSUM_GEN_TCP 1 -#define CHECKSUM_GEN_ICMP 1 -#define CHECKSUM_CHECK_IP 0 -#define CHECKSUM_CHECK_UDP 0 -#define CHECKSUM_CHECK_TCP 0 -#define CHECKSUM_CHECK_ICMP 0 - -/* The following defines must be done even in OPTTEST mode: */ -#if !defined(NO_SYS) || !NO_SYS /* default is 0 */ -void sys_check_core_locking(void); -#define LWIP_ASSERT_CORE_LOCKED() //sys_check_core_locking() -void sys_mark_tcpip_thread(void); -#define LWIP_MARK_TCPIP_THREAD() //sys_mark_tcpip_thread() - -#if !defined(LWIP_TCPIP_CORE_LOCKING) || LWIP_TCPIP_CORE_LOCKING /* default is 1 */ -/** The global semaphore to lock the stack. */ -extern sys_mutex_t lock_tcpip_core; -#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core)//sys_lock_tcpip_core() -#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core)//sys_unlock_tcpip_core() -#endif -#endif - -#endif diff --git a/third-party/lwip-2.1.2/ports/lwipopts.h b/third-party/lwip-2.1.2/ports/lwipopts.h new file mode 100644 index 0000000000000000000000000000000000000000..b380e532f34db6cbce92e030098a836565054e83 --- /dev/null +++ b/third-party/lwip-2.1.2/ports/lwipopts.h @@ -0,0 +1,1236 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: lwipopts.h + * Date: 2022-09-16 13:54:28 + * LastEditTime: 2022-09-16 13:54:28 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + +#ifndef LWIP_HDR_LWIPOPTS_H +#define LWIP_HDR_LWIPOPTS_H + +#include "sdkconfig.h" +#ifndef SDK_CONFIG_H__ + #warning "Please include sdkconfig.h" +#endif + +#include "arch/sys_arch.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* System */ +#define NO_SYS 0 +#define LWIP_COMPAT_MUTEX_ALLOWED 1 +#define LWIP_COMPAT_MUTEX 1 /* Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary semaphore should be used instead */ +#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 +#define LWIP_PROVIDE_ERRNO 1 /* 使用errno */ + + +/* Memory config */ + +#define MEM_LIBC_MALLOC 0 + +/* mem heap */ + +#if defined(CONFIG_LWIP_USE_MEM_HEAP) + +#define MEMP_MEM_MALLOC 1 +/* 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. */ +#define MEM_SIZE (CONFIG_MEM_SIZE * 1024 * 1024) /* mem heap size */ + +#else + +#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 + */ +#define MEM_ALIGNMENT CONFIG_MEM_ALIGNMENT + + +/* Internal Memory Pool Sizes */ + +/* mem pool */ + +#ifdef CONFIG_LWIP_USE_MEM_POOL + +/** + * 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. + */ +#define MEM_USE_POOLS 1 + +#define MEMP_USE_CUSTOM_POOLS 1 + +/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application + sends a lot of data out of ROM (or other static memory), this + should be set high. */ +#define MEMP_NUM_PBUF CONFIG_MEMP_NUM_PBUF + +#else +#endif + + +/* ---------- Pbuf options ---------- */ +/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ +#define PBUF_POOL_SIZE (CONFIG_PBUF_POOL_SIZE * 1024) /* pbuf tests need ~200KByte */ +/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ +#define PBUF_POOL_BUFSIZE (CONFIG_PBUF_POOL_BUFSIZE * 1024) /* this parameter need over xmac rx_buf_size*/ + + +/** + * MEMP_NUM_NETCONN: the number of struct netconns. + * (only needed if you use the sequential API, like api_lib.c) + */ +#define MEMP_NUM_NETCONN CONFIG_LWIP_MAX_SOCKETS + +/** + * MEMP_NUM_RAW_PCB: Number of raw connection PCBs + * (requires the LWIP_RAW option) + */ +#define MEMP_NUM_RAW_PCB CONFIG_LWIP_MAX_RAW_PCBS + +/** + * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. + * (requires the LWIP_TCP option) + */ +#define MEMP_NUM_TCP_PCB CONFIG_LWIP_MAX_ACTIVE_TCP + +/** + * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. + * (requires the LWIP_TCP option) + */ +#define MEMP_NUM_TCP_PCB_LISTEN CONFIG_LWIP_MAX_LISTENING_TCP + +/** + * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One + * per active UDP "connection". + * (requires the LWIP_UDP option) + */ +#define MEMP_NUM_UDP_PCB CONFIG_LWIP_MAX_UDP_PCBS + + +/* ARP options */ + +/** + * 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. + */ +#define ARP_QUEUEING 1 + + +/* IP options */ +/** + * LWIP_IPV4==1: Enable IPv4 + */ +#define LWIP_IPV4 1 + +/** + * IP_REASSEMBLY==1: Reassemble incoming fragmented IP4 packets. Note that + * this option does not affect outgoing packet sizes, which can be controlled + * via IP_FRAG. + */ +#ifdef CONFIG_LWIP_IP4_REASSEMBLY +#define IP_REASSEMBLY 1 +#else +#define IP_REASSEMBLY 0 +#endif + +/** + * IP_FRAG==1: Fragment outgoing IP4 packets if their size exceeds MTU. Note + * that this option does not affect incoming packet sizes, which can be + * controlled via IP_REASSEMBLY. + */ +#ifdef CONFIG_LWIP_IP4_FRAG +#define IP_FRAG 1 +#else +#define IP_FRAG 0 +#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. + */ +#ifdef CONFIG_LWIP_IP_FORWARD +#define IP_FORWARD 1 +#else +#define IP_FORWARD 0 +#endif + +/** + * IP_NAPT==1: Enables IPv4 Network Address and Port Translation. + * Note that both CONFIG_LWIP_IP_FORWARD and CONFIG_LWIP_L2_TO_L3_COPY options + * need to be enabled in system configuration + */ +#ifdef CONFIG_LWIP_IPV4_NAPT +#define IP_NAPT 1 +#else +#define IP_NAPT 0 +#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. + */ +#define IP_REASS_MAXAGE 3 + +/** + * 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! + */ +#define IP_REASS_MAX_PBUFS CONFIG_IP_REASS_MAX_PBUFS + +/* ICMP options */ + +/** + * LWIP_ICMP==1: Enable ICMP module inside the IP stack. + * Be careful, disable that make your product non-compliant to RFC1122 + */ +#ifdef CONFIG_LWIP_ICMP +#define LWIP_ICMP 1 +#else +#define LWIP_ICMP 0 +#endif + +/** + * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) + */ +#ifdef CONFIG_LWIP_BROADCAST_PING +#define LWIP_BROADCAST_PING 1 +#else +#define LWIP_BROADCAST_PING 0 +#endif + +/** + * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) + */ +#ifdef CONFIG_LWIP_MULTICAST_PING +#define LWIP_MULTICAST_PING 1 +#else +#define LWIP_MULTICAST_PING 0 +#endif + + +/* RAW options */ +/** + * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. + */ +#define LWIP_RAW 1 + +/* DHCP options */ +/** + * LWIP_DHCP==1: Enable DHCP module. + */ +#if defined(CONFIG_LWIP_DHCP_ENABLE) +#define LWIP_DHCP 1 +#else +#define LWIP_DHCP 0 +#endif + +/** + * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. + */ +#ifdef CONFIG_LWIP_DHCP_DOES_ARP_CHECK +#define DHCP_DOES_ARP_CHECK 1 +#else +#define DHCP_DOES_ARP_CHECK 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); +*/ +#ifdef CONFIG_LWIP_DHCP_GET_NTP_SRV +#define LWIP_DHCP_GET_NTP_SRV 1 +#else +#define LWIP_DHCP_GET_NTP_SRV 0 +#endif + +/** + * LWIP_DHCP_DISABLE_CLIENT_ID==1: Do not add option 61 (client-id) to DHCP packets + * + */ +#ifdef CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID +#define ESP_DHCP_DISABLE_CLIENT_ID 1 +#else +#define ESP_DHCP_DISABLE_CLIENT_ID 0 +#endif + +/** + * CONFIG_LWIP_DHCP_RESTORE_LAST_IP==1: Last valid IP address obtained from DHCP server + * is restored after reset/power-up. + */ +#ifdef CONFIG_LWIP_DHCP_RESTORE_LAST_IP +/* + * Make the post-init hook check if we could restore the previously bound address + * - if yes reset the state to bound and mark result as ERR_OK (which skips discovery state) + * - if no, return false to continue normally to the discovery state + */ +#define LWIP_HOOK_DHCP_POST_INIT(netif, result) \ + (dhcp_ip_addr_restore(netif) ? ( dhcp_set_state(dhcp, DHCP_STATE_BOUND), \ + dhcp_network_changed(netif), \ + (result) = ERR_OK , \ + true ) : \ + false) +#else +#define LWIP_HOOK_DHCP_PRE_DISCOVERY(netif, result) (false) +#endif /* CONFIG_LWIP_DHCP_RESTORE_LAST_IP */ + +/** + * The maximum of NTP servers requested + */ +#define LWIP_DHCP_MAX_NTP_SERVERS CONFIG_LWIP_DHCP_MAX_NTP_SERVERS + +/** + * CONFIG_LWIP_DHCP_OPTIONS_LEN: The total length of outgoing DHCP option msg. If you have many options + * and options value is too long, you can configure the length according to your requirements + */ +#define DHCP_OPTIONS_LEN CONFIG_LWIP_DHCP_OPTIONS_LEN + +/** + * LWIP_DHCP_DISABLE_VENDOR_CLASS_ID==1: Do not add option 60 (Vendor Class Identifier) to DHCP packets + */ +#define ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID + + +/* Since for embedded devices it's not that hard to miss a discover packet, so lower + * the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s. + */ +#define DHCP_REQUEST_TIMEOUT_SEQUENCE(tries) (( (tries) < 6 ? 1 << (tries) : 60) * 250) + +static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) +{ + uint32_t timeout = lease; + if (timeout == 0) { + timeout = min; + } + return timeout; +} + +#define DHCP_CALC_TIMEOUT_FROM_OFFERED_T0_LEASE(dhcp) \ + timeout_from_offered((dhcp)->offered_t0_lease, 120) +#define DHCP_CALC_TIMEOUT_FROM_OFFERED_T1_RENEW(dhcp) \ + timeout_from_offered((dhcp)->offered_t1_renew, (dhcp)->t0_timeout>>1 /* 50% */ ) +#define DHCP_CALC_TIMEOUT_FROM_OFFERED_T2_REBIND(dhcp) \ + timeout_from_offered((dhcp)->offered_t2_rebind, ((dhcp)->t0_timeout/8)*7 /* 87.5% */ ) + +// #define LWIP_HOOK_DHCP_PARSE_OPTION(netif, dhcp, state, msg, msg_type, option, len, pbuf, offset) \ +// do { LWIP_UNUSED_ARG(msg); \ +// dhcp_parse_extra_opts(dhcp, state, option, len, pbuf, offset); \ +// } while(0) + +// #define LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, state, msg, msg_type, options_len_ptr) \ +// dhcp_append_extra_opts(netif, state, msg, options_len_ptr); + +/* AUTOIP options */ + +/** + * LWIP_AUTOIP==1: Enable AUTOIP module. + */ +#ifdef CONFIG_LWIP_AUTOIP +#define LWIP_AUTOIP 1 + +/** +* LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on +* the same interface at the same time. +*/ +#define LWIP_DHCP_AUTOIP_COOP 1 + +/** +* LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes +* that should be sent before falling back on AUTOIP. 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. +*/ +#define LWIP_DHCP_AUTOIP_COOP_TRIES CONFIG_LWIP_AUTOIP_TRIES + +/** + * LWIP_AUTOIP_MAX_CONFLICTS: Defines max conflicts before rate limiting + */ +#define LWIP_AUTOIP_MAX_CONFLICTS CONFIG_LWIP_AUTOIP_MAX_CONFLICTS + +/** + * LWIP_AUTOIP_RATE_LIMIT_INTERVAL: Delay in seconds between successive attempts + */ +#define LWIP_AUTOIP_RATE_LIMIT_INTERVAL CONFIG_LWIP_AUTOIP_RATE_LIMIT_INTERVAL + +#endif /* CONFIG_LWIP_AUTOIP */ + +/* IGMP options */ +/** + * LWIP_IGMP==1: Turn on IGMP module. + */ +#define LWIP_IGMP 1 + +/* DNS options */ +/** + * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS + * transport. + */ +#define LWIP_DNS 1 + +/** The maximum of DNS servers + */ +#define DNS_MAX_SERVERS 3 + +/** + * + * The last server can be initialized automatically by defining + * FALLBACK_DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' + */ +#define DNS_FALLBACK_SERVER_INDEX (DNS_MAX_SERVERS - 1) + +/** + * LWIP_DNS_SUPPORT_MDNS_QUERIES==1: Enable mDNS queries in hostname resolution. + * This option is set via menuconfig. + */ +#ifdef CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES +#define LWIP_DNS_SUPPORT_MDNS_QUERIES 1 +#else +#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 +#endif + +/* UDP options */ + +/** + * LWIP_UDP==1: Turn on UDP. + */ +#define LWIP_UDP 1 + +/** + * LWIP_NETBUF_RECVINFO==1: Enable IP_PKTINFO option. + * This option is set via menuconfig. + */ +#ifdef CONFIG_LWIP_NETBUF_RECVINFO +#define LWIP_NETBUF_RECVINFO 1 +#else +#define LWIP_NETBUF_RECVINFO 0 +#endif + + +/* TCP options */ + +/** + * LWIP_TCP==1: Turn on TCP. + */ +#define LWIP_TCP 1 + +/** + * 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 + */ +#define TCP_WND CONFIG_LWIP_TCP_WND_DEFAULT + +/** + * TCP_MAXRTX: Maximum number of retransmissions of data segments. + */ +#define TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX + +/** + * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. + */ +#define TCP_SYNMAXRTX CONFIG_LWIP_TCP_SYNMAXRTX + +/** + * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. + * Define to 0 if your device is low on memory. + */ +#ifdef CONFIG_LWIP_TCP_QUEUE_OOSEQ +#define TCP_QUEUE_OOSEQ 1 +#else +#define TCP_QUEUE_OOSEQ 0 +#endif + +/** + * LWIP_TCP_SACK_OUT==1: TCP will support sending selective acknowledgements (SACKs). + */ +#ifdef CONFIG_LWIP_TCP_SACK_OUT +#define LWIP_TCP_SACK_OUT 1 +#else +#define LWIP_TCP_SACK_OUT 0 +#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. + */ +#define TCP_MSS CONFIG_LWIP_TCP_MSS + +/** + * TCP_SND_BUF: TCP sender buffer space (bytes). + * To achieve good performance, this should be at least 2 * TCP_MSS. + */ +#define TCP_SND_BUF CONFIG_LWIP_TCP_SND_BUF_DEFAULT + + +/** + * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. + */ +#define TCP_LISTEN_BACKLOG 1 + +/** + * TCP_OVERSIZE: The maximum number of bytes that tcp_write may + * allocate ahead of time + */ +#ifdef CONFIG_LWIP_TCP_OVERSIZE_MSS +#define TCP_OVERSIZE TCP_MSS +#endif +#ifdef CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS +#define TCP_OVERSIZE (TCP_MSS/4) +#endif +#ifdef CONFIG_LWIP_TCP_OVERSIZE_DISABLE +#define TCP_OVERSIZE 0 +#endif +#ifndef TCP_OVERSIZE +#error "One of CONFIG_TCP_OVERSIZE_xxx options should be set by sdkconfig" +#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. + */ +#define LWIP_EVENT_API 0 +#define LWIP_CALLBACK_API 1 + +/** + * TCP_TMR_INTERVAL: TCP timer interval + */ +#define TCP_TMR_INTERVAL CONFIG_LWIP_TCP_TMR_INTERVAL + +/** + * TCP_MSL: The maximum segment lifetime in milliseconds + */ +#define TCP_MSL CONFIG_LWIP_TCP_MSL + +/** + * 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. + */ +#ifdef CONFIG_LWIP_WND_SCALE +#define LWIP_WND_SCALE 1 +#define TCP_RCV_SCALE CONFIG_LWIP_TCP_RCV_SCALE +#else +#define LWIP_WND_SCALE 0 +#define TCP_RCV_SCALE 0 +#endif /* CONFIG_LWIP_WND_SCALE */ + +/** + * LWIP_TCP_RTO_TIME: TCP rto time. + * Default is 3 second. + */ +#define LWIP_TCP_RTO_TIME CONFIG_LWIP_TCP_RTO_TIME + + +/* Network Interfaces options */ + +/** + * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname + * field. + */ +#define LWIP_NETIF_HOSTNAME 1 + +/** + * LWIP_NETIF_API==1: Support netif api (in netifapi.c) + */ +#ifdef CONFIG_LWIP_NETIF_API +#define LWIP_NETIF_API 1 +#else +#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) + */ +#ifdef CONFIG_LWIP_NETIF_STATUS_CALLBACK +#define LWIP_NETIF_STATUS_CALLBACK 1 +#else +#define LWIP_NETIF_STATUS_CALLBACK 0 +#endif + + +/** + * LWIP_NETIF_EXT_STATUS_CALLBACK==1: Support an extended callback function + * for several netif related event that supports multiple subscribers. + * + */ +#define LWIP_NETIF_EXT_STATUS_CALLBACK 1 + +/** + * 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! + * + * ATTENTION: a driver should *NOT* rely on getting single pbufs but check TX + * pbufs for being in one piece. If not, @ref pbuf_clone can be used to get + * a single pbuf: + * if (p->next != NULL) { + * struct pbuf *q = pbuf_clone(PBUF_RAW, PBUF_RAM, p); + * if (q == NULL) { + * return ERR_MEM; + * } + * p = q; ATTENTION: do NOT free the old 'p' as the ref belongs to the caller! + * } + */ +#define LWIP_NETIF_TX_SINGLE_PBUF 1 + +/* + ------------------------------------ + ---------- LOOPIF options ---------- + ------------------------------------ +*/ + +/* loopif options */ +/** + * 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 +*/ +#ifdef CONFIG_LWIP_NETIF_LOOPBACK +#define LWIP_HAVE_LOOPIF 1 + +/** + * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP + * address equal to the netif IP address, looping them back up the stack. + */ +#define LWIP_NETIF_LOOPBACK 1 + +/** + * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback + * sending for each netif (0 = disabled) + */ +#define LWIP_LOOPBACK_MAX_PBUFS CONFIG_LWIP_LOOPBACK_MAX_PBUFS +#else +#define LWIP_HAVE_LOOPIF 0 +#endif + +/* SLIPIF options */ + +#ifdef CONFIG_LWIP_SLIP_SUPPORT +/** + * Enable SLIP receive from ISR functions and disable Rx thread + * + * This is the only supported mode of lwIP SLIP interface, so that + * - incoming packets are queued into pbufs + * - no thread is created from lwIP + * meaning it is the application responsibility to read data + * from IO driver and feed them to the slip interface + */ +#define SLIP_RX_FROM_ISR 1 +#define SLIP_USE_RX_THREAD 0 + +/** + * SLIP_DEBUG: Enable debugging for SLIP. + */ +#ifdef CONFIG_LWIP_SLIP_DEBUG_ON +#define SLIP_DEBUG LWIP_DBG_ON +#else +#define SLIP_DEBUG LWIP_DBG_OFF +#endif +#endif /* CONFIG_LWIP_SLIP_SUPPORT */ + +/* Platform specific locking */ + +/** + * 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. + */ +#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING +#define LWIP_TCPIP_CORE_LOCKING 1 +#else +#define LWIP_TCPIP_CORE_LOCKING 0 +#endif + +/** + * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain + * critical regions during buffer allocation, deallocation and memory + * allocation and deallocation. + */ +#define SYS_LIGHTWEIGHT_PROT 1 + +/** + * MEMCPY: override this if you have a faster implementation at hand than the + * one included in your C library + */ +#define MEMCPY(dst,src,len) memcpy(dst,src,len) + +/** + * 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. + */ +#define SMEMCPY(dst,src,len) memcpy(dst,src,len) + + +/* Sequential layer options */ + +/** + * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) + */ +#define LWIP_NETCONN 1 + +/** 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 LWIP_TCPIP_CORE_LOCKING +#define LWIP_NETCONN_SEM_PER_THREAD 0 +#else +#define LWIP_NETCONN_SEM_PER_THREAD 1 +#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 + */ +#define LWIP_NETCONN_FULLDUPLEX 1 + + +/* Socket options */ + +/** + * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) + */ +#define LWIP_SOCKET 1 + +/** + * 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) + */ +#define LWIP_COMPAT_SOCKETS 1 + +/** + * 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) + * + * POSIX I/O functions are mapped to LWIP via the VFS layer + * (see port/vfs_lwip.c) + */ +/** + */ +#define LWIP_POSIX_SOCKETS_IO_NAMES 1 + +/** + * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n. + * + * FD_SETSIZE from sys/types.h is the maximum number of supported file + * descriptors and CONFIG_LWIP_MAX_SOCKETS defines the number of sockets; + * LWIP_SOCKET_OFFSET is configured to use the largest numbers of file + * descriptors for sockets. File descriptors from 0 to LWIP_SOCKET_OFFSET-1 + * are non-socket descriptors and from LWIP_SOCKET_OFFSET to FD_SETSIZE are + * socket descriptors. + */ +#define LWIP_SOCKET_OFFSET (FD_SETSIZE - CONFIG_LWIP_MAX_SOCKETS) + +/** + * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and + * SO_SNDTIMEO processing. + */ +#define LWIP_SO_SNDTIMEO 1 + +/** + * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and + * SO_RCVTIMEO processing. + */ +#define LWIP_SO_RCVTIMEO 1 + +/** + * 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) + */ +#define LWIP_TCP_KEEPALIVE 1 + +/** + * LWIP_SO_LINGER==1: Enable SO_LINGER processing. + * This option is set via menuconfig. + */ +#ifdef CONFIG_LWIP_SO_LINGER +#define LWIP_SO_LINGER 1 +#else +#define LWIP_SO_LINGER 0 +#endif + +/** + * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. + * This option is set via menuconfig. + */ +#ifdef CONFIG_LWIP_SO_RCVBUF +#define LWIP_SO_RCVBUF 1 +#else +#define LWIP_SO_RCVBUF 0 +#endif + +/** + * SO_REUSE==1: Enable SO_REUSEADDR option. + * This option is set via menuconfig. + */ +#ifdef CONFIG_LWIP_SO_REUSE +#define SO_REUSE 1 +#else +#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! + */ +#ifdef CONFIG_LWIP_SO_REUSE_RXTOALL +#define SO_REUSE_RXTOALL 1 +#else +#define SO_REUSE_RXTOALL 0 +#endif + +/** LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided + * by your system, set this to 0 and include in cc.h */ +#define LWIP_TIMEVAL_PRIVATE 0 + +/* Statistics options */ + +/** + * LWIP_STATS==1: Enable statistics collection in lwip_stats. + */ +#ifdef CONFIG_LWIP_STATS +#define LWIP_STATS 1 +#define ESP_STATS_MEM 1 + +/** + * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. + */ +#define LWIP_STATS_DISPLAY 1 +#else +#define LWIP_STATS 0 +#define ESP_STATS_MEM 0 +#endif /* CONFIG_LWIP_STATS */ + + +/* PPP options */ + +/** + * PPP_SUPPORT==1: Enable PPP. + */ +#ifdef CONFIG_LWIP_PPP_SUPPORT +#define PPP_SUPPORT 1 + +/** + * PPP_IPV6_SUPPORT == 1: Enable IPV6 support for local link + * between modem and lwIP stack. + * Some modems do not support IPV6 addressing in local link and + * the only option available is to disable IPV6 address negotiation. + */ +#define PPP_IPV6_SUPPORT CONFIG_LWIP_PPP_ENABLE_IPV6 + +/** + * PPP_NOTIFY_PHASE==1: Support PPP notify phase. + */ +#define PPP_NOTIFY_PHASE CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT + +/** + * PAP_SUPPORT==1: Support PAP. + */ +#define PAP_SUPPORT CONFIG_LWIP_PPP_PAP_SUPPORT + +/** + * CHAP_SUPPORT==1: Support CHAP. + */ +#define CHAP_SUPPORT CONFIG_LWIP_PPP_CHAP_SUPPORT + +/** + * MSCHAP_SUPPORT==1: Support MSCHAP. + */ +#define MSCHAP_SUPPORT CONFIG_LWIP_PPP_MSCHAP_SUPPORT + +/** + * CCP_SUPPORT==1: Support CCP. + */ +#define MPPE_SUPPORT CONFIG_LWIP_PPP_MPPE_SUPPORT + +/** + * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char. + * TODO: If PPP_MAXIDLEFLAG > 0 and next package is send during PPP_MAXIDLEFLAG time, + * then 0x7E is not added at the begining of PPP package but 0x7E termination + * is always at the end. This behaviour brokes PPP dial with GSM (PPPoS). + * The PPP package should always start and end with 0x7E. + */ + +#define PPP_MAXIDLEFLAG 0 + +#ifdef CONFIG_LWIP_ENABLE_LCP_ECHO +/** + * LCP_ECHOINTERVAL: Interval in seconds between keepalive LCP echo requests, 0 to disable. + */ +#define LCP_ECHOINTERVAL CONFIG_LWIP_LCP_ECHOINTERVAL + +/** + * LCP_MAXECHOFAILS: Number of consecutive unanswered echo requests before failure is indicated. + */ +#define LCP_MAXECHOFAILS CONFIG_LWIP_LCP_MAXECHOFAILS +#endif /* CONFIG_LWIP_ENABLE_LCP_ECHO */ + +/** + * PPP_DEBUG: Enable debugging for PPP. + */ +#ifdef CONFIG_LWIP_PPP_DEBUG_ON +#define PPP_DEBUG LWIP_DBG_ON +#define PRINTPKT_SUPPORT 1 +#define PPP_PROTOCOLNAME 1 +#else +#define PPP_DEBUG LWIP_DBG_OFF +#endif /* CONFIG_LWIP_PPP_DEBUG_ON */ +#else +#define PPP_SUPPORT 0 +#endif /* CONFIG_LWIP_PPP_SUPPORT */ + + +/* checksum options */ + +/** + * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. + */ +#ifdef CONFIG_LWIP_CHECKSUM_CHECK_IP +#define CHECKSUM_CHECK_IP 1 +#else +#define CHECKSUM_CHECK_IP 0 +#endif + +/** + * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. + */ +#ifdef CONFIG_LWIP_CHECKSUM_CHECK_UDP +#define CHECKSUM_CHECK_UDP 1 +#else +#define CHECKSUM_CHECK_UDP 0 +#endif + +/** + * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. + */ +#ifdef CONFIG_LWIP_CHECKSUM_CHECK_ICMP +#define CHECKSUM_CHECK_ICMP 1 +#else +#define CHECKSUM_CHECK_ICMP 0 +#endif + +/* IPv6 options */ + +/** + * LWIP_IPV6==1: Enable IPv6 + */ +#if defined(CONFIG_LWIP_IPV6) && !defined(CONFIG_USE_IPV4_ONLY) +#define LWIP_IPV6 1 +#else +#define LWIP_IPV6 0 +#endif + +/** + * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. + */ +#define LWIP_IPV6_NUM_ADDRESSES CONFIG_LWIP_IPV6_NUM_ADDRESSES + +/** + * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs + */ +#ifdef CONFIG_LWIP_IPV6_FORWARD +#define LWIP_IPV6_FORWARD 1 +#else +#define LWIP_IPV6_FORWARD 0 +#endif + +/** + * LWIP_IPV6_FRAG==1: Fragment outgoing IP6 packets if their size exceeds MTU. Note + * that this option does not affect incoming packet sizes, which can be + * controlled via IP6_REASSEMBLY. + */ +#ifdef CONFIG_LWIP_IP6_FRAG +#define LWIP_IPV6_FRAG 1 +#else +#define LWIP_IPV6_FRAG 0 +#endif + +/** + * LWIP_IPV6_REASS==1: reassemble incoming IP6 packets that fragmented. Note that + * this option does not affect outgoing packet sizes, which can be controlled + * via LWIP_IP6_FRAG. + */ +#ifdef CONFIG_LWIP_IP6_REASSEMBLY +#define LWIP_IPV6_REASS 1 +#define IPV6_FRAG_COPYHEADER 1 +#else +#define LWIP_IPV6_REASS 0 +#endif + + +/** + * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. + */ +#ifdef CONFIG_LWIP_IPV6_AUTOCONFIG +#define ESP_IPV6_AUTOCONFIG 1 +#else +#define ESP_IPV6_AUTOCONFIG 0 +#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. + */ +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS + +/** + * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful/stateless address autoconfiguration. + */ +#ifdef CONFIG_LWIP_IPV6_DHCP6 +#define LWIP_IPV6_DHCP6 1 +#else +#define LWIP_IPV6_DHCP6 0 +#endif + +/** + * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. + */ +#define MEMP_NUM_ND6_QUEUE CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE + +/** + * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache + */ +#define LWIP_ND6_NUM_NEIGHBORS CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS + +/* Hook options */ + + +// #define LWIP_HOOK_FILENAME "lwip_default_hooks.h" +// #define LWIP_HOOK_IP4_ROUTE_SRC ip4_route_src_hook +#include "sockets_ext.h" +#define LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, err) \ + lwip_getsockopt_impl_ext(sock, level, optname, optval, optlen, err)?(done_socket(sock), 1): 0 + +#define LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, err) \ + lwip_setsockopt_impl_ext(sock, level, optname, optval, optlen, err)?(done_socket(sock), 1): 0 + + + +/* debug option */ +/** + * LWIP_DEBUG: Enable lwip debugging in other modules. + */ +#ifdef CONFIG_LWIP_DEBUG +#define LWIP_DEBUG LWIP_DBG_ON +#else +#undef LWIP_DEBUG +#endif + +/** + * ETHARP_DEBUG: Enable debugging in etharp.c. + */ +#ifdef CONFIG_LWIP_ETHARP_DEBUG +#define ETHARP_DEBUG LWIP_DBG_ON +#else +#define ETHARP_DEBUG LWIP_DBG_OFF +#endif + +/** + * NETIF_DEBUG: Enable debugging in netif.c. + */ +#ifdef CONFIG_LWIP_NETIF_DEBUG +#define NETIF_DEBUG LWIP_DBG_ON +#else +#define NETIF_DEBUG LWIP_DBG_OFF +#endif + +/** + * PBUF_DEBUG: Enable debugging in pbuf.c. + */ +#ifdef CONFIG_LWIP_PBUF_DEBUG +#define PBUF_DEBUG LWIP_DBG_ON +#else +#define PBUF_DEBUG LWIP_DBG_OFF +#endif + +/** + * API_LIB_DEBUG: Enable debugging in api_lib.c. + */ +#ifdef CONFIG_LWIP_API_LIB_DEBUG +#define API_LIB_DEBUG LWIP_DBG_ON +#else +#define API_LIB_DEBUG LWIP_DBG_OFF +#endif + +/** + * SOCKETS_DEBUG: Enable debugging in sockets.c. + */ +#ifdef CONFIG_LWIP_SOCKETS_DEBUG +#define SOCKETS_DEBUG LWIP_DBG_ON +#else +#define SOCKETS_DEBUG LWIP_DBG_OFF +#endif + +/** + * ICMP_DEBUG: Enable debugging in icmp.c. + */ +#ifdef CONFIG_LWIP_ICMP_DEBUG +#define ICMP_DEBUG LWIP_DBG_ON +#else +#define ICMP_DEBUG LWIP_DBG_OFF +#endif + +#ifdef CONFIG_LWIP_ICMP6_DEBUG +#define ICMP6_DEBUG LWIP_DBG_ON +#else +#define ICMP6_DEBUG LWIP_DBG_OFF +#endif + +/** + * DHCP_DEBUG: Enable debugging in dhcp.c. + */ +#ifdef CONFIG_LWIP_DHCP_DEBUG +#define DHCP_DEBUG LWIP_DBG_ON +#else +#define DHCP_DEBUG LWIP_DBG_OFF +#endif + + +/** + * IP_DEBUG: Enable debugging for IP. + */ +#ifdef CONFIG_LWIP_IP_DEBUG +#define IP_DEBUG LWIP_DBG_ON +#define IP_REASS_DEBUG LWIP_DBG_ON +#else +#define IP_DEBUG LWIP_DBG_OFF + +#endif + +/** + * IP6_DEBUG: Enable debugging for IP6. + */ +#ifdef CONFIG_LWIP_IP6_DEBUG +#define IP6_DEBUG LWIP_DBG_ON +#else +#define IP6_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_DEBUG: Enable debugging for TCP. + */ +#ifdef CONFIG_LWIP_TCP_DEBUG +#define TCP_DEBUG LWIP_DBG_ON +#else +#define TCP_DEBUG LWIP_DBG_OFF +#endif + +/** + * SNTP_DEBUG: Enable debugging for SNTP. + */ +#ifdef CONFIG_LWIP_SNTP_DEBUG +#define SNTP_DEBUG LWIP_DBG_ON +#else +#define SNTP_DEBUG LWIP_DBG_OFF +#endif + +/** + * DNS_DEBUG: Enable debugging for DNS. + */ +#ifdef CONFIG_LWIP_DNS_DEBUG +#define DNS_DEBUG LWIP_DBG_ON +#else +#define DNS_DEBUG LWIP_DBG_OFF +#endif + +/** + * MEMP_DEBUG: Enable debugging in memp.c. + */ +#define MEMP_DEBUG LWIP_DBG_OFF + +/** + * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. + */ +#define TCP_INPUT_DEBUG LWIP_DBG_OFF + +/** + * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. + */ +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF + +/** + * TCPIP_DEBUG: Enable debugging in tcpip.c. + */ +#define TCPIP_DEBUG LWIP_DBG_OFF + +/** + * TCP_OOSEQ_DEBUG: Enable debugging in tcpin.c for OOSEQ. + */ +#define TCP_OOSEQ_DEBUG LWIP_DBG_OFF + + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_LWIPOPTS_H */ diff --git a/third-party/lwip-2.1.2/ports/lwippools.h b/third-party/lwip-2.1.2/ports/lwippools.h new file mode 100644 index 0000000000000000000000000000000000000000..80d293e216e64abba14c065d2cf9892067030dec --- /dev/null +++ b/third-party/lwip-2.1.2/ports/lwippools.h @@ -0,0 +1,29 @@ +/* + * Copyright : (C) 2022 Phytium Information Technology, Inc. + * All Rights Reserved. + * + * This program is OPEN SOURCE software: you can redistribute it and/or modify it + * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd, + * either version 1.0 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the Phytium Public License for more details. + * + * + * FilePath: lwippools.h + * Date: 2022-09-22 16:39:55 + * LastEditTime: 2022-09-22 16:39:56 + * Description: This file is for + * + * Modify History: + * Ver Who Date Changes + * ----- ------ -------- -------------------------------------- + */ + + +#ifndef LWIP_POOLS_H +#define LWIP_POOLS_H + +#endif // ! + diff --git a/third-party/lwip-2.1.2/ports/sockets_ext.c b/third-party/lwip-2.1.2/ports/sockets_ext.c new file mode 100644 index 0000000000000000000000000000000000000000..2a940c09f3e50f2ab315f01f35896216f4b1d0ea --- /dev/null +++ b/third-party/lwip-2.1.2/ports/sockets_ext.c @@ -0,0 +1,109 @@ +/* + * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "lwip/sockets.h" +#include "lwip/priv/sockets_priv.h" +#include "lwip/api.h" +#include "lwip/sys.h" +#include "lwip/tcp.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "sockets_ext.h" + +#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype) do { \ + if (((optlen) < sizeof(opttype)) || ((sock)->conn == NULL) || ((sock)->conn->pcb.tcp == NULL)) { *err=EINVAL; goto exit; } }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) { *err=ENOPROTOOPT; goto exit; } } while(0) + + +bool lwip_setsockopt_impl_ext(struct lwip_sock* sock, int level, int optname, const void *optval, socklen_t optlen, int *err) +{ +#if LWIP_IPV6 + if (level != IPPROTO_IPV6) +#endif /* LWIP_IPV6 */ + { + return false; + } + +#if LWIP_IPV6 + switch (optname) { + default: + return false; + case IPV6_MULTICAST_IF: /* NB: like IP_MULTICAST_IF, this takes an IP not an index */ + { + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); + udp_set_multicast_netif_index(sock->conn->pcb.udp, (u8_t)(*(const u8_t*)optval)); + } + break; + case IPV6_MULTICAST_HOPS: + 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 IPV6_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; + } +exit: + return true; +#endif /* LWIP_IPV6 */ +} + +bool lwip_getsockopt_impl_ext(struct lwip_sock* sock, int level, int optname, void *optval, uint32_t *optlen, int *err) +{ +#if LWIP_IPV6 + if (level != IPPROTO_IPV6) +#endif /* LWIP_IPV6 */ + { + return false; + } + +#if LWIP_IPV6 + switch (optname) { + default: + return false; + case IPV6_MULTICAST_IF: /* NB: like IP_MULTICAST_IF, this returns an IP not an index */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { + *err = ENOPROTOOPT; + goto exit; + } + *(u8_t*)optval = udp_get_multicast_netif_index(sock->conn->pcb.udp); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt_ext(IPPROTO_IPV6, IPV6_MULTICAST_IF) = 0x%"X32_F"\n", + *(u32_t *)optval)); + break; + case IPV6_MULTICAST_HOPS: + printf("IPV6_MULTICAST_HOPS\n"); + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { + *err = ENOPROTOOPT; + goto exit; + } + *(u8_t*)optval = udp_get_multicast_ttl(sock->conn->pcb.udp); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt_ext(IPPROTO_IPV6, IP_MULTICAST_LOOP) = %d\n", + *(int *)optval)); + break; + case IPV6_MULTICAST_LOOP: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_MULTICAST_LOOP) != 0) { + *(u8_t*)optval = 1; + } else { + *(u8_t*)optval = 0; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt_ext(IPPROTO_IPV6, IP_MULTICAST_LOOP) = %d\n", + *(int *)optval)); + break; + } +exit: + return true; +#endif /* LWIP_IPV6 */ +} diff --git a/third-party/lwip-2.1.2/ports/sockets_ext.h b/third-party/lwip-2.1.2/ports/sockets_ext.h new file mode 100644 index 0000000000000000000000000000000000000000..48ffcf61e11fcacc5f939dd8ab05f5c819f71769 --- /dev/null +++ b/third-party/lwip-2.1.2/ports/sockets_ext.h @@ -0,0 +1,24 @@ +/* + * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define IPV6_MULTICAST_IF 0x300 +#define IPV6_MULTICAST_HOPS 0x301 +#define IPV6_MULTICAST_LOOP 0x302 + +struct lwip_sock; + +bool lwip_setsockopt_impl_ext(struct lwip_sock* sock, int level, int optname, const void *optval, uint32_t optlen, int *err); +bool lwip_getsockopt_impl_ext(struct lwip_sock* sock, int level, int optname, void *optval, uint32_t *optlen, int *err); +#ifdef __cplusplus +} +#endif diff --git a/third-party/third-party.mk b/third-party/third-party.mk index dfc34e2190e28617c0829b469b4af7d61af2dea5..fcf058cce87108c7f320f1285317c75beedd8e51 100644 --- a/third-party/third-party.mk +++ b/third-party/third-party.mk @@ -26,35 +26,37 @@ SRC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/api \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/core \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/core/ipv4 \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/core/ipv6 \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/netif + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/netif \ + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/port INC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/compat \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/lwip \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/lwip/apps \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/lwip/priv \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/lwip/prot \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/netif + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/lwip/port \ + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/netif \ + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/port # src code of ports ifdef CONFIG_LWIP_FGMAC INC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fgmac \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fgmac/arch \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fgmac/arch SRC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fgmac \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fgmac/arch \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fgmac/arch endif ifdef CONFIG_LWIP_FXMAC INC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fxmac \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fxmac/arch \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/apps/ping + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/apps/ping \ + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports SRC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fxmac \ $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/fxmac/arch \ - $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/apps/ping + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/apps/ping \ + $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports endif