Browse Source

!102 修改can测试例程

pull/103/MERGE
黄锦 1 year ago
committed by 王晓东
parent
commit
420010ebd1
  1. 1
      arch/armv8/aarch32/fgeneric_timer.c
  2. 1
      arch/armv8/aarch64/fgeneric_timer.c
  3. 11
      board/e2000d_demo/fsdif_timing.c
  4. 11
      board/e2000q_demo/fsdif_timing.c
  5. 11
      board/firefly/fsdif_timing.c
  6. 49
      doc/ChangeLog.md
  7. 15
      drivers/can/Kconfig
  8. 23
      drivers/can/fcan/fcan.c
  9. 8
      drivers/can/fcan/fcan.h
  10. 11
      drivers/can/fcan/fcan_hw.h
  11. 139
      drivers/eth/fgmac/fgmac.c
  12. 16
      drivers/eth/fgmac/fgmac.h
  13. 2
      drivers/i2c/fi2c/fi2c_master.c
  14. 2
      drivers/mmc/fsdif/fsdif.c
  15. 2
      drivers/mmc/fsdif/fsdif.h
  16. 1
      drivers/mmc/fsdif/fsdif_dma.c
  17. 2
      drivers/scmi/fscmi_mhu/fscmi.c
  18. 3
      example/network/lwip_multicast/Kconfig
  19. 123
      example/network/lwip_multicast/README.md
  20. 439
      example/network/lwip_multicast/configs/d2000_aarch32_test_lwip_multicast.config
  21. 429
      example/network/lwip_multicast/configs/d2000_aarch64_test_lwip_multicast.config
  22. 452
      example/network/lwip_multicast/configs/e2000d_aarch32_demo_lwip_multicast.config
  23. 442
      example/network/lwip_multicast/configs/e2000d_aarch64_demo_lwip_multicast.config
  24. 451
      example/network/lwip_multicast/configs/e2000q_aarch32_demo_lwip_multicast.config
  25. 441
      example/network/lwip_multicast/configs/e2000q_aarch64_demo_lwip_multicast.config
  26. 439
      example/network/lwip_multicast/configs/ft2004_aarch32_dsk_lwip_multicast.config
  27. 429
      example/network/lwip_multicast/configs/ft2004_aarch64_dsk_lwip_multicast.config
  28. 450
      example/network/lwip_multicast/configs/phytiumpi_aarch32_firefly_lwip_multicast.config
  29. 440
      example/network/lwip_multicast/configs/phytiumpi_aarch64_firefly_lwip_multicast.config
  30. BIN
      example/network/lwip_multicast/fig/multicast_example_result.png
  31. 53
      example/network/lwip_multicast/inc/lwip_multicast_example.h
  32. 57
      example/network/lwip_multicast/inc/lwip_timer.h
  33. 64
      example/network/lwip_multicast/main.c
  34. 19
      example/network/lwip_multicast/makefile
  35. 440
      example/network/lwip_multicast/sdkconfig
  36. 394
      example/network/lwip_multicast/sdkconfig.h
  37. 92
      example/network/lwip_multicast/src/cmd_lwip_multicast.c
  38. 200
      example/network/lwip_multicast/src/lwip_multicast_example.c
  39. 222
      example/network/lwip_multicast/src/lwip_timer.c
  40. 61
      example/peripherals/can/can/README.md
  41. BIN
      example/peripherals/can/can/fig/can_filter.png
  42. BIN
      example/peripherals/can/can/fig/can_intr.png
  43. BIN
      example/peripherals/can/can/fig/can_polled.png
  44. 7
      example/peripherals/can/can/inc/can_common.h
  45. 3
      example/peripherals/can/can/main.c
  46. 71
      example/peripherals/can/can/src/can_id_filter_example.c
  47. 48
      example/peripherals/can/can/src/can_intr_loopback_mode_example.c
  48. 38
      example/peripherals/can/can/src/can_polled_loopback_mode_example.c
  49. 4
      example/peripherals/can/can/src/cmd_can.c
  50. 84
      example/peripherals/can/canfd/README.md
  51. 14
      example/peripherals/can/canfd/configs/e2000d_aarch32_demo_canfd.config
  52. 14
      example/peripherals/can/canfd/configs/e2000d_aarch64_demo_canfd.config
  53. 14
      example/peripherals/can/canfd/configs/e2000q_aarch32_demo_canfd.config
  54. 14
      example/peripherals/can/canfd/configs/e2000q_aarch64_demo_canfd.config
  55. BIN
      example/peripherals/can/canfd/fig/can_connect.png
  56. BIN
      example/peripherals/can/canfd/fig/canfd_filter.png
  57. BIN
      example/peripherals/can/canfd/fig/canfd_intr.png
  58. BIN
      example/peripherals/can/canfd/fig/canfd_polled.png
  59. BIN
      example/peripherals/can/canfd/fig/menuconfig.png
  60. 19
      example/peripherals/can/canfd/inc/canfd_common.h
  61. 2
      example/peripherals/can/canfd/inc/canfd_id_filter_example.h
  62. 52
      example/peripherals/can/canfd/inc/canfd_intr_loopback_mode_example.h
  63. 4
      example/peripherals/can/canfd/main.c
  64. 33
      example/peripherals/can/canfd/sdkconfig
  65. 29
      example/peripherals/can/canfd/sdkconfig.h
  66. 83
      example/peripherals/can/canfd/src/canfd_id_filter_example.c
  67. 429
      example/peripherals/can/canfd/src/canfd_intr_loopback_mode_example.c
  68. 65
      example/peripherals/can/canfd/src/canfd_polled_loopback_mode_example.c
  69. 20
      example/peripherals/can/canfd/src/cmd_canfd.c
  70. 1
      example/peripherals/sd/makefile
  71. 6
      example/peripherals/sd/src/sdif/sdif_sdio_detect_example.c
  72. 62
      example/peripherals/serial/sdkconfig
  73. 59
      example/peripherals/serial/sdkconfig.h
  74. 1
      soc/common/fcpu_info.c
  75. 109
      soc/d2000/fcpu_affinity_mask.c
  76. 119
      soc/d2000/fmmu_table.c
  77. 5
      soc/d2000/src.mk
  78. 60
      soc/e2000/d/fcpu_affinity_mask.c
  79. 119
      soc/e2000/d/fmmu_table.c
  80. 71
      soc/e2000/q/fcpu_affinity_mask.c
  81. 107
      soc/e2000/q/fmmu_table.c
  82. 49
      soc/e2000/s/fcpu_affinity_mask.c
  83. 107
      soc/e2000/s/fmmu_table.c
  84. 4
      soc/e2000/src.mk
  85. 76
      soc/ft2004/fcpu_affinity_mask.c
  86. 69
      soc/ft2004/fmmu_table.c
  87. 5
      soc/ft2004/src.mk
  88. 71
      soc/phytiumpi/fcpu_affinity_mask.c
  89. 77
      soc/phytiumpi/fmmu_table.c
  90. 4
      soc/phytiumpi/src.mk
  91. 96
      third-party/lwip-2.1.2/ports/fgmac/ethernetif.c
  92. 5
      third-party/lwip-2.1.2/ports/fgmac/fgmac_lwip_port.c
  93. 4
      third-party/lwip-2.1.2/ports/fgmac/fgmac_lwip_port.h
  94. 4
      third-party/lwip-2.1.2/ports/fxmac/ethernetif.c

1
arch/armv8/aarch32/fgeneric_timer.c

@ -28,7 +28,6 @@
#include "fparameters.h"
#include "fgeneric_timer.h"
#include "faarch32.h"
#include "sdkconfig.h"
#include "fassert.h"
#include "fkernel.h"

1
arch/armv8/aarch64/fgeneric_timer.c

@ -27,7 +27,6 @@
#include "fparameters.h"
#include "fgeneric_timer.h"
#include "faarch64.h"
#include "sdkconfig.h"
#include "fassert.h"
#include "fkernel.h"

11
board/e2000d_demo/fsdif_timing.c

@ -26,11 +26,12 @@
#include "fassert.h"
#include "fiopad.h"
#include "fsdif_timing.h"
#include "fio_mux.h"
#define FSDIF_0_SD_CCLK_OUT_DELAY FIOPAD_AJ45_REG1_OFFSET
#define FSDIF_1_SD_CCLK_OUT_DELAY FIOPAD_J53_REG1_OFFSET
static FIOPadCtrl iopad_ctrl;
extern FIOPadCtrl iopad_ctrl;
static void FSdifSetSDIFDelay(u32 sdif_id)
{
@ -146,6 +147,8 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
tuning = &mmc_52mhz;
break;
/* TODO: more clock freq for tuning */
default:
break;
}
}
else
@ -163,6 +166,8 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
tuning = &sd_100mhz;
break;
/* TODO: more clock freq for tuning */
default:
break;
}
}
@ -171,10 +176,10 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
void FSdifTimingInit(void)
{
(void)FIOPadCfgInitialize(&iopad_ctrl, FIOPadLookupConfig(FIOPAD0_ID));
FIOMuxInit();
}
void FSdifTimingDeinit(void)
{
FIOPadDeInitialize(&iopad_ctrl);
FIOMuxDeInit();
}

11
board/e2000q_demo/fsdif_timing.c

@ -25,11 +25,12 @@
#include "fparameters.h"
#include "fiopad.h"
#include "fsdif_timing.h"
#include "fio_mux.h"
#define FSDIF_0_SD_CCLK_OUT_DELAY FIOPAD_AJ49_REG1_OFFSET
#define FSDIF_1_SD_CCLK_OUT_DELAY FIOPAD_J57_REG1_OFFSET
static FIOPadCtrl iopad_ctrl;
extern FIOPadCtrl iopad_ctrl;
static void FSdifSetSDIFDelay(u32 sdif_id)
{
@ -145,6 +146,8 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
tuning = &mmc_52mhz;
break;
/* TODO: more clock freq for tuning */
default:
break;
}
}
else
@ -162,6 +165,8 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
tuning = &sd_100mhz;
break;
/* TODO: more clock freq for tuning */
default:
break;
}
}
@ -170,10 +175,10 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
void FSdifTimingInit(void)
{
(void)FIOPadCfgInitialize(&iopad_ctrl, FIOPadLookupConfig(FIOPAD0_ID));
FIOMuxInit();
}
void FSdifTimingDeinit(void)
{
FIOPadDeInitialize(&iopad_ctrl);
FIOMuxDeInit();
}

11
board/firefly/fsdif_timing.c

@ -25,11 +25,12 @@
#include "fparameters.h"
#include "fiopad.h"
#include "fsdif_timing.h"
#include "fio_mux.h"
#define FSDIF_0_SD_CCLK_OUT_DELAY FIOPAD_AJ49_REG1_OFFSET
#define FSDIF_1_SD_CCLK_OUT_DELAY FIOPAD_J57_REG1_OFFSET
static FIOPadCtrl iopad_ctrl;
extern FIOPadCtrl iopad_ctrl;
static void FSdifSetSDIFDelay(u32 sdif_id)
{
@ -145,6 +146,8 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
tuning = &mmc_52mhz;
break;
/* TODO: more clock freq for tuning */
default:
break;
}
}
else
@ -162,6 +165,8 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
tuning = &sd_100mhz;
break;
/* TODO: more clock freq for tuning */
default:
break;
}
}
@ -170,10 +175,10 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r
void FSdifTimingInit(void)
{
(void)FIOPadCfgInitialize(&iopad_ctrl, FIOPadLookupConfig(FIOPAD0_ID));
FIOMuxInit();
}
void FSdifTimingDeinit(void)
{
FIOPadDeInitialize(&iopad_ctrl);
FIOMuxDeInit();
}

49
doc/ChangeLog.md

@ -1,3 +1,52 @@
# Phytium Standalone SDK 2023-11-9 ChangeLog
Change Log since 2023-11-9
## driver
- Code specification modification
# Phytium Standalone SDK 2023-11-6 ChangeLog
Change Log since 2023-10-26
## driver
- add FGmac_SetHash and FGmac_DeleteHash function to support gmac hash register configuration.
## example
- lwip multicast example added,which can show multicast hash feature of mac controller.
## third-party
- add gmac_filter_update api to support gmac hash fitering multicast frame.
# Phytium Standalone SDK 2023-11-6 ChangeLog
Change Log since 2023-11-6
## example
- modify can and canfd
# Phytium Standalone SDK 2023-11-6 ChangeLog
Change Log since 2023-11-6
## soc
- add fmmu_table.c and fcpu_affinity_mask.c
# Phytium Standalone SDK 2023-11-3 ChangeLog
Change Log since 2023-11-3
## example
- sd example debug
# Phytium Standalone SDK 2023-11-02 ChangeLog
Change Log since 2023-11-02

15
drivers/can/Kconfig

@ -1,18 +1,7 @@
menu "CAN Configuration"
config USE_FCAN
config USE_FCAN
bool
prompt "Use FCAN"
default n
if USE_FCAN
config FCAN_USE_CANFD
depends on TARGET_E2000 || TARGET_TARDIGRADE || TARGET_PHYTIUMPI
bool
prompt "Use CanFD"
default n
help
use canfd protocol
endif
endmenu
Include FCAN driver component

23
drivers/can/fcan/fcan.c

@ -22,6 +22,7 @@
* 1.0 wangxiaodong 2022/5/26 first release
* 1.1 wangxiaodong 2022/9/23 improve functions
* 1.2 zhangyan 2022/12/7 improve functions
* 1.3 huangjin 2023/10/31 improve functions
*/
#include "string.h"
@ -658,6 +659,20 @@ FError FCanSend(FCanCtrl *instance_p, FCanFrame *frame_p)
while (FCAN_TX_FIFO_FULL(instance_p));
u32 can_send_dlc = FCanSetDlcLen(frame_p->candlc);
/* 根据use_canfd判断dlc是否有效 */
if (instance_p->use_canfd == FALSE)
{
if(can_send_dlc <= 8)
{
FCAN_DEBUG("FCanSend protocol is:%s\n", "can");
FASSERT(can_send_dlc <= 8);
}
}
else
{
FCAN_DEBUG("FCanSend protocol is:%s\n", "canfd");
FASSERT(instance_p->use_canfd == TRUE);
}
if (frame_p->canid & CAN_EFF_FLAG)
{
@ -930,7 +945,7 @@ FError FCanBaudrateSet(FCanCtrl *instance_p, FCanBaudrateConfig *baudrate_p)
}
/**
* @name: FCanFdEnable
* @name: FCanEnable
* @msg: Enable or disable can.
* @param {FCanCtrl} *instance_p, instance of FCanCtrl controller
* @param {boolean} enable, TRUE-enable canfd, FALSE-disable canfd.
@ -1002,6 +1017,11 @@ FError FCanIdMaskFilterSet(FCanCtrl *instance_p, FCanIdMaskConfig *id_mask_p)
id = id_mask_p->id << FCAN_ACC_IDN_SHIFT;
mask = id_mask_p->mask << FCAN_ACC_IDN_SHIFT;
}
else
{
id = id_mask_p->id;
mask = id_mask_p->mask;
}
FCAN_WRITE_REG32(base_address, id_reg_offset, id);
FCAN_WRITE_REG32(base_address, mask_reg_offset, mask);
@ -1149,4 +1169,3 @@ FError FCanSetMode(FCanCtrl *instance_p, u32 tran_mode)
return FCAN_SUCCESS;
}

8
drivers/can/fcan/fcan.h

@ -22,6 +22,7 @@
* 1.0 wangxiaodong 2022/5/26 first release
* 1.1 wangxiaodong 2022/9/23 improve functions
* 1.2 zhangyan 2022/12/7 improve functions
* 1.3 huangjin 2023/11/01 improve functions
*/
@ -33,7 +34,6 @@
#include "fparameters.h"
#include "fkernel.h"
#include "fcan_hw.h"
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C"
@ -58,11 +58,7 @@ typedef enum
#define FCAN_FAILURE FT_MAKE_ERRCODE(ErrModBsp, ErrBspCan, 2) /* failed */
#define FCAN_INVAL_PARAM FT_MAKE_ERRCODE(ErrModBsp, ErrBspCan, 3) /* invalid parameters */
#if defined(CONFIG_FCAN_USE_CANFD)
#define FCAN_DATA_LENGTH 64U
#else
#define FCAN_DATA_LENGTH 8U
#endif
#define FCAN_DATA_LENGTH 64U
/* CAN payload length and DLC definitions according to ISO 11898-1 */
#define CAN_MAX_DLC 8

11
drivers/can/fcan/fcan_hw.h

@ -58,6 +58,7 @@ extern "C"
#define FCAN_FRM_INFO_OFFSET 0x48 /* Frame valid number register */
#define FCAN_TX_FIFO_OFFSET 0x100/* TX FIFO shadow register */
#define FCAN_RX_FIFO_OFFSET 0x200/* RX FIFO shadow register */
#define FCAN_RX_INFO_FIFO_OFFSET 0X300/* Current frame status register */
/*----------------------------------------------------------------------------*/
/* CAN register bit masks - FCAN_<REG>_<BIT>_MASK */
@ -147,6 +148,10 @@ extern "C"
#define FCANFD_IDR_GET_EDLC_SHIFT 12
#define FCANFD_IDR1_SDLC_SHIFT 11
/* CAN_DMA_CTRL */
#define FCAN_DMA_CTRL_TFRE_SET BIT(22)
#define FCAN_DMA_CTRL_RFRE_SET BIT(6)
/* can */
#define FCAN_IDR_ID2_GET(x) GET_REG32_BITS((x), 18, 1) /* Get extended message ident */
#define FCAN_IDR_ID2_SET(x) SET_REG32_BITS((x), 18, 1) /* Set extended message ident */
@ -173,6 +178,12 @@ extern "C"
#define FTCAN_INTR_EN (FTCAN_INTR_TEIE_MASK | FTCAN_INTR_REIE_MASK | FTCAN_INTR_RFIE_MASK)
/* Current frame status */
#define FCAN_IORF_STS_RS_GET(x) GET_REG32_BITS((x), 7, 7) /* Whether it is an extended frame */
#define FCAN_FORF_STS_RS_GET(x) GET_REG32_BITS((x), 6, 6) /* Whether it is an canfd */
#define FCAN_RORF_STS_RS_GET(x) GET_REG32_BITS((x), 5, 5) /* Whether it is an remote frame */
#define FCAN_WNORF_STS_RS_GET(x) GET_REG32_BITS((x), 4, 0) /* The number of words of the currently received frame */
/* Can timming */
#if defined(SOC_TARGET_FT2004) || defined(SOC_TARGET_D2000)

139
drivers/eth/fgmac/fgmac.c

@ -508,3 +508,142 @@ static FError FGmacDmaConfigure(FGmac *instance_p)
return ret;
}
FError FGmacMulticastHashEnable(FGmac *instance_p)
{
FASSERT(instance_p);
uintptr base_addr = instance_p->config.base_addr;
FError ret = FGMAC_SUCCESS;
u32 reg_val = 0;
/* MAC帧过滤寄存器 */
reg_val = FGMAC_READ_REG32(base_addr, FGMAC_FRAME_FILTER_OFFSET);
/* 去使能全部接收RA */
reg_val &= (~FGMAC_FRAME_FILTER_RA);
/* 开启散列多播*/
reg_val |= FGMAC_FRAME_FILTER_HMC;
FGMAC_WRITE_REG32(base_addr, FGMAC_FRAME_FILTER_OFFSET, reg_val);
return ret;
}
void FGmacClearIntrStatus(FGmac *instance_p)
{
FASSERT(instance_p);
uintptr base_addr = instance_p->config.base_addr;
u32 reg_val = 0;
FGMAC_WRITE_REG32(base_addr, FGMAC_INTR_STATUS_OFFSET, reg_val);
}
/* reverse a u32 number */
u32 Rev32(u32 x)
{
u32 y=0;
for( int i=0; i<32; i++)
{
if (x & (1 << i))
{
y |= 1 << (31 - i);
}
}
return(y);
}
FError FGmac_SetHash(FGmac *instance_p, void *mac_address)
{
FASSERT(instance_p != NULL);
FASSERT(mac_address != NULL);
FASSERT(instance_p->is_ready == (u32)FT_COMPONENT_IS_READY);
u32 hash_addr;
u8 *aptr = (u8 *)(void *)mac_address;
u32 crc;
u32 hash_index;
FError status = FT_SUCCESS;
uintptr base_addr = instance_p->config.base_addr;
/* Be sure device has been stopped */
crc = 0xFFFFFFFF;
for(int j=0; j<6; j++)
{
crc = crc ^ (u32)aptr[j];
for(int i=0; i<8; i++)
if (crc & 1)
crc = (crc >> 1) ^ 0xEDB88320; // Reversed 0x04C11DB7
else
crc = (crc >> 1);
}
hash_index = (Rev32(~crc) >> 26); // Get High order 6-bit in reversed/inverted crc
if (hash_index < (u32)32)
{
hash_addr = FGMAC_READ_REG32(base_addr, FGMAC_HASH_LOW_OFFSET);
hash_addr |= BIT(hash_index);
FGMAC_WRITE_REG32(base_addr, FGMAC_HASH_LOW_OFFSET, hash_addr);
}
else
{
hash_addr = FGMAC_READ_REG32(base_addr, FGMAC_HASH_HIGH_OFFSET);
hash_index -= 32;
hash_addr |= BIT(hash_index);
FGMAC_WRITE_REG32(base_addr, FGMAC_HASH_HIGH_OFFSET, hash_addr);
}
return status;
}
FError FGmac_DeleteHash(FGmac *instance_p, void *mac_address)
{
FASSERT(instance_p != NULL);
FASSERT(mac_address != NULL);
FASSERT(instance_p->is_ready == (u32)FT_COMPONENT_IS_READY);
u32 hash_addr;
u8 *aptr = (u8 *)(void *)mac_address;
u32 crc;
u32 hash_index;
FError status = FT_SUCCESS;
uintptr base_addr = instance_p->config.base_addr;
/* Be sure device has been stopped */
crc = 0xFFFFFFFF;
for(int j=0; j<6; j++)
{
crc = crc ^ (u32)aptr[j];
for(int i=0; i<8; i++)
if (crc & 1)
crc = (crc >> 1) ^ 0xEDB88320; // Reversed 0x04C11DB7
else
crc = (crc >> 1);
}
hash_index = (Rev32(~crc) >> 26); // Get High order 6-bit in reversed/inverted crc
if (hash_index < (u32)32)
{
hash_addr = FGMAC_READ_REG32(base_addr, FGMAC_HASH_LOW_OFFSET);
hash_addr &= (~BIT(hash_index));
FGMAC_WRITE_REG32(base_addr, FGMAC_HASH_LOW_OFFSET, hash_addr);
}
else
{
hash_addr = FGMAC_READ_REG32(base_addr, FGMAC_HASH_HIGH_OFFSET);
hash_index -= 32;
hash_addr &= (~BIT(hash_index));
FGMAC_WRITE_REG32(base_addr, FGMAC_HASH_HIGH_OFFSET, hash_addr);
}
return status;
}

16
drivers/eth/fgmac/fgmac.h

@ -217,6 +217,9 @@ const FGmacConfig *FGmacLookupConfig(u32 instance_id);
/* 完成FGMAC驱动实例的初始化,使之可以使用 */
FError FGmacCfgInitialize(FGmac *instance_p, const FGmacConfig *cofig_p);
/* 完成FGMAC驱动实例散列组播帧过滤使能*/
FError FGmacMulticastHashEnable(FGmac *instance_p);
/* 完成FGMAC驱动实例去使能,清零实例数据 */
FError FGmacDeInitialize(FGmac *instance_p);
@ -252,14 +255,23 @@ void FGmacSetInterruptMask(FGmac *instance_p, u32 intr_type, u32 mask);
/* 设置FGMAC中断使能位 */
void FGmacSetInterruptUmask(FGmac *instance_p, u32 intr_type, u32 mask);
/*fgmac deplex mode configuration */
/*fgmac duplex mode configuration */
void FGmacControllerDuplexConfig(FGmac *instance_p, u32 duplex);
/*fgmac speed configuration */
void FGmacControllerSpeedConfig(FGmac *instance_p, u32 speed);
/* 停止FGMAC控制器寄存器 */
/* 停止FGMAC控制器 */
void FGmacStop(FGmac *instance_p);
/* 复位FGMAC中断状态寄存器 */
void FGmacClearIntrStatus(FGmac *instance_p);
/* 在FGMAC散列表中添加Mac地址 */
FError FGmac_SetHash(FGmac *instance_p, void *mac_address);
/* 在FGMAC散列表中删除Mac地址 */
FError FGmac_DeleteHash(FGmac *instance_p, void *mac_address);
#ifdef __cplusplus
}
#endif

2
drivers/i2c/fi2c/fi2c_master.c

@ -320,7 +320,7 @@ FError FI2cMasterReadIntr(FI2c *instance_p, u32 mem_addr, u8 mem_byte_len, u8 *b
FASSERT(instance_p);
u32 mask;
u32 reg_val;
u32 trans_timeout;
u32 trans_timeout = 0;
if (FT_COMPONENT_IS_READY != instance_p->is_ready)
{

2
drivers/mmc/fsdif/fsdif.c

@ -298,7 +298,7 @@ FError FSdifResetCtrl(uintptr base_addr, u32 reset_bits)
do
{
reg_val = FSDIF_READ_REG(base_addr, FSDIF_STATUS_OFFSET);
} while (!FSDIF_STATUS_FIFO_EMPTY & reg_val);
} while (!(FSDIF_STATUS_FIFO_EMPTY & reg_val));
if (retries <= 0)
{

2
drivers/mmc/fsdif/fsdif.h

@ -158,7 +158,7 @@ typedef struct
volatile boolean success; /* TRUE: comand and data transfer success */
} FSdifCmdData; /* SDIF trans command and data */
typedef const FSdifTiming *(*FSdifGetTuning)(FSdifClkSpeed clock_freq, u32 non_removable);
typedef const FSdifTiming *(*FSdifGetTuning)(FSdifClkSpeed clock_freq, boolean non_removable);
typedef struct _FSdifTiming
{

1
drivers/mmc/fsdif/fsdif_dma.c

@ -379,7 +379,6 @@ FError FSdifSetIDMAList(FSdif *const instance_p, volatile FSdifIDmaDesc *desc, u
{
FASSERT(instance_p);
FError ret = FSDIF_SUCCESS;
uintptr base_addr = instance_p->config.base_addr;
if (FT_COMPONENT_IS_READY != instance_p->is_ready)
{

2
drivers/scmi/fscmi_mhu/fscmi.c

@ -212,7 +212,7 @@ FError FScmiProtocolTxPrepare(FScmi *instance_p,u8 pro_id)
struct FScmiSharedMem *mem =(struct FScmiSharedMem *) instance_p->config.share_mem;
struct FScmiTransferInfo *trans_info;
u32 index_id = 0;
u32 time_out;
u32 time_out = 0;
FError ret;
static int is_init = 0;
ret = FScmiProtocolMapping(pro_id, &index_id);

3
example/network/lwip_multicast/Kconfig

@ -0,0 +1,3 @@
mainmenu "Phytium Baremetal Configuration"
source "$(SDK_DIR)/standalone.kconfig"

123
example/network/lwip_multicast/README.md

@ -0,0 +1,123 @@
# LWIP MULTICAST 测试
## 1. 例程介绍
><font size="1">介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作</font><br />
本例程示范了MAC控制器在lwip ipv4模式下的初始化流程,同时通过igmp协议,可以对网卡进行组播特性收发数据包测试。
### 1.1 网卡组播特性测试例程 (lwip_multicast_example.c)
- ipv4模式下初始化开发板上所有网口以及对应网卡控制器
- 为每个网卡配置静态IPv4地址,同时使其加入相同的组播地址,成为共同的组播组成员
- 可以通过主机端对组播地址进行ping,能收到该组播组中所有成员网卡的回应
## 2. 如何使用例程
><font size="1">描述开发平台准备,使用例程配置,构建和下载镜像的过程</font><br />
本例程需要以下硬件,
- E2000D/Q Demo板,FT2000/4开发板,D2000开发板,PhytiumPi
- 串口线和串口上位机
### 2.1 硬件配置方法
><font size="1">哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出)</font><br />
- 为方便测试,一般需要自带路由器设备。
- 关于路由器配置,请参考网上相关资料自行配置。
### 2.2 SDK配置方法
><font size="1">依赖哪些驱动、库和第三方组件,如何完成配置(列出需要使能的关键配置项)</font><br />
本例程需要:
- LWIP组件,依赖 USE_LWIP
- Letter Shell组件,依赖 USE_LETTER_SHELL
对应的配置项是,
- CONFIG_USE_LWIP
- CONFIG_USE_LETTER_SHELL
- 本例子已经提供好具体的编译指令,以下进行介绍:
1. make 将目录下的工程进行编译
2. make clean 将目录下的工程进行清理
3. make image 将目录下的工程进行编译,并将生成的elf 复制到目标地址
4. make list_kconfig 当前工程支持哪些配置文件
5. make load_kconfig LOAD_CONFIG_NAME=`<kconfig configuration files>` 将预设配置加载至工程中
6. make menuconfig 配置目录下的参数变量
7. make backup_kconfig 将目录下的sdkconfig 备份到./configs下
- 具体使用方法为:
- 在当前目录下
- 执行以上指令
### 2.3 构建和下载
><font size="1">描述构建、烧录下载镜像的过程,列出相关的命令</font><br />
本文档将以E2000demo开发板为例,对于其它平台,使用对应的默认配置
- 在host端完成配置
- 选择目标平台
```
make load_kconfig LOAD_CONFIG_NAME=e2000d_aarch64_demo_lwip_multicast
```
- 选择例程需要的配置
```
make menuconfig
```
- 进行编译
```
make
```
- 将编译出的镜像放置到tftp目录下
```
make image
```
- host侧设置重启host侧tftp服务器
```
sudo service tftpd-hpa restart
```
- 开发板侧使用bootelf命令跳转
```
setenv ipaddr 192.168.4.20
setenv serverip 192.168.4.50
setenv gatewayip 192.168.4.1
tftpboot 0x90100000 baremetal.elf
bootelf -p 0x90100000
```
### 2.4 输出与实验现象
><font size="1">描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片)</font><br />
#### 2.4.1 网卡组播特性测试例程 (lwip_multicast_example.c)
```
lwip multicast
```
![multicast_example_result](./fig/multicast_example_result.png)
## 3. 如何解决问题
><font size="1">主要记录使用例程中可能会遇到的问题,给出相应的解决方案</font><br />
## 4. 修改历史记录
><font size="1">记录例程的重大修改记录,标明修改发生的版本号 </font><br />

439
example/network/lwip_multicast/configs/d2000_aarch32_test_lwip_multicast.config

@ -0,0 +1,439 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
# CONFIG_ARCH_ARMV8_AARCH64 is not set
CONFIG_ARCH_ARMV8_AARCH32=y
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH32=y
CONFIG_ARCH_EXECUTION_STATE="aarch32"
#
# Fpu configuration
#
CONFIG_CRYPTO_NEON_FP_ARMV8=y
# CONFIG_VFPV4 is not set
# CONFIG_VFPV4_D16 is not set
# CONFIG_VFPV3 is not set
# CONFIG_VFPV3_D16 is not set
CONFIG_ARM_MFPU="crypto-neon-fp-armv8"
CONFIG_MFLOAT_ABI_HARD=y
# CONFIG_MFLOAT_ABI_SOFTFP is not set
CONFIG_ARM_MFLOAT_ABI="hard"
# end of Fpu configuration
# end of Compiler configuration
CONFIG_USE_CACHE=y
# CONFIG_USE_L3CACHE is not set
CONFIG_USE_MMU=y
CONFIG_USE_AARCH64_L1_TO_AARCH32=y
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
CONFIG_TARGET_D2000=y
CONFIG_SOC_NAME="d2000"
CONFIG_SOC_CORE_NUM=8
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="test"
CONFIG_D2000_TEST_BOARD=y
#
# IO mux configuration when board start up
#
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
CONFIG_ENABLE_IOCTRL=y
# CONFIG_ENABLE_IOPAD is not set
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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 is not set
CONFIG_ENABLE_FGMAC=y
CONFIG_FGMAC_PHY_COMMON=y
# CONFIG_FGMAC_PHY_AR803X 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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
# CONFIG_LWIP_FXMAC is not set
CONFIG_LWIP_FGMAC=y
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
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
# end of Build setup

429
example/network/lwip_multicast/configs/d2000_aarch64_test_lwip_multicast.config

@ -0,0 +1,429 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
# end of Compiler configuration
CONFIG_USE_CACHE=y
# CONFIG_USE_L3CACHE is not set
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
CONFIG_TARGET_D2000=y
CONFIG_SOC_NAME="d2000"
CONFIG_SOC_CORE_NUM=8
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="test"
CONFIG_D2000_TEST_BOARD=y
#
# IO mux configuration when board start up
#
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
CONFIG_ENABLE_IOCTRL=y
# CONFIG_ENABLE_IOPAD is not set
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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 is not set
CONFIG_ENABLE_FGMAC=y
CONFIG_FGMAC_PHY_COMMON=y
# CONFIG_FGMAC_PHY_AR803X 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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
# CONFIG_LWIP_FXMAC is not set
CONFIG_LWIP_FGMAC=y
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
# end of Linker Options
# end of Build setup

452
example/network/lwip_multicast/configs/e2000d_aarch32_demo_lwip_multicast.config

@ -0,0 +1,452 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
# CONFIG_ARCH_ARMV8_AARCH64 is not set
CONFIG_ARCH_ARMV8_AARCH32=y
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH32=y
CONFIG_ARCH_EXECUTION_STATE="aarch32"
#
# Fpu configuration
#
CONFIG_CRYPTO_NEON_FP_ARMV8=y
# CONFIG_VFPV4 is not set
# CONFIG_VFPV4_D16 is not set
# CONFIG_VFPV3 is not set
# CONFIG_VFPV3_D16 is not set
CONFIG_ARM_MFPU="crypto-neon-fp-armv8"
CONFIG_MFLOAT_ABI_HARD=y
# CONFIG_MFLOAT_ABI_SOFTFP is not set
CONFIG_ARM_MFLOAT_ABI="hard"
# end of Fpu configuration
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_USE_AARCH64_L1_TO_AARCH32=y
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
CONFIG_TARGET_E2000D=y
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="d"
CONFIG_SOC_CORE_NUM=2
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_E2000D_DEMO_BOARD=y
CONFIG_BOARD_NAME="demo"
#
# IO mux configuration when board start up
#
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_ADC_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
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
# end of Build setup

442
example/network/lwip_multicast/configs/e2000d_aarch64_demo_lwip_multicast.config

@ -0,0 +1,442 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
CONFIG_TARGET_E2000D=y
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="d"
CONFIG_SOC_CORE_NUM=2
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_E2000D_DEMO_BOARD=y
CONFIG_BOARD_NAME="demo"
#
# IO mux configuration when board start up
#
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_ADC_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
# end of Linker Options
# end of Build setup

451
example/network/lwip_multicast/configs/e2000q_aarch32_demo_lwip_multicast.config

@ -0,0 +1,451 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
# CONFIG_ARCH_ARMV8_AARCH64 is not set
CONFIG_ARCH_ARMV8_AARCH32=y
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH32=y
CONFIG_ARCH_EXECUTION_STATE="aarch32"
#
# Fpu configuration
#
CONFIG_CRYPTO_NEON_FP_ARMV8=y
# CONFIG_VFPV4 is not set
# CONFIG_VFPV4_D16 is not set
# CONFIG_VFPV3 is not set
# CONFIG_VFPV3_D16 is not set
CONFIG_ARM_MFPU="crypto-neon-fp-armv8"
CONFIG_MFLOAT_ABI_HARD=y
# CONFIG_MFLOAT_ABI_SOFTFP is not set
CONFIG_ARM_MFLOAT_ABI="hard"
# end of Fpu configuration
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_USE_AARCH64_L1_TO_AARCH32=y
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
CONFIG_TARGET_E2000Q=y
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="q"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="demo"
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_E2000Q_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
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
# end of Build setup

441
example/network/lwip_multicast/configs/e2000q_aarch64_demo_lwip_multicast.config

@ -0,0 +1,441 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
CONFIG_TARGET_E2000Q=y
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="q"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="demo"
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_E2000Q_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
# end of Linker Options
# end of Build setup

439
example/network/lwip_multicast/configs/ft2004_aarch32_dsk_lwip_multicast.config

@ -0,0 +1,439 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
# CONFIG_ARCH_ARMV8_AARCH64 is not set
CONFIG_ARCH_ARMV8_AARCH32=y
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH32=y
CONFIG_ARCH_EXECUTION_STATE="aarch32"
#
# Fpu configuration
#
CONFIG_CRYPTO_NEON_FP_ARMV8=y
# CONFIG_VFPV4 is not set
# CONFIG_VFPV4_D16 is not set
# CONFIG_VFPV3 is not set
# CONFIG_VFPV3_D16 is not set
CONFIG_ARM_MFPU="crypto-neon-fp-armv8"
CONFIG_MFLOAT_ABI_HARD=y
# CONFIG_MFLOAT_ABI_SOFTFP is not set
CONFIG_ARM_MFLOAT_ABI="hard"
# end of Fpu configuration
# end of Compiler configuration
CONFIG_USE_CACHE=y
# CONFIG_USE_L3CACHE is not set
CONFIG_USE_MMU=y
CONFIG_USE_AARCH64_L1_TO_AARCH32=y
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
CONFIG_TARGET_FT2004=y
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="ft2004"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="dsk"
CONFIG_FT2004_DSK_BOARD=y
#
# IO mux configuration when board start up
#
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
CONFIG_ENABLE_IOCTRL=y
# CONFIG_ENABLE_IOPAD is not set
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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 is not set
CONFIG_ENABLE_FGMAC=y
CONFIG_FGMAC_PHY_COMMON=y
# CONFIG_FGMAC_PHY_AR803X 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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
# CONFIG_LWIP_FXMAC is not set
CONFIG_LWIP_FGMAC=y
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
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
# end of Build setup

429
example/network/lwip_multicast/configs/ft2004_aarch64_dsk_lwip_multicast.config

@ -0,0 +1,429 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
# end of Compiler configuration
CONFIG_USE_CACHE=y
# CONFIG_USE_L3CACHE is not set
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
CONFIG_TARGET_FT2004=y
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="ft2004"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="dsk"
CONFIG_FT2004_DSK_BOARD=y
#
# IO mux configuration when board start up
#
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
CONFIG_ENABLE_IOCTRL=y
# CONFIG_ENABLE_IOPAD is not set
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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 is not set
CONFIG_ENABLE_FGMAC=y
CONFIG_FGMAC_PHY_COMMON=y
# CONFIG_FGMAC_PHY_AR803X 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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
# CONFIG_LWIP_FXMAC is not set
CONFIG_LWIP_FGMAC=y
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
# end of Linker Options
# end of Build setup

450
example/network/lwip_multicast/configs/phytiumpi_aarch32_firefly_lwip_multicast.config

@ -0,0 +1,450 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
# CONFIG_ARCH_ARMV8_AARCH64 is not set
CONFIG_ARCH_ARMV8_AARCH32=y
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH32=y
CONFIG_ARCH_EXECUTION_STATE="aarch32"
#
# Fpu configuration
#
CONFIG_CRYPTO_NEON_FP_ARMV8=y
# CONFIG_VFPV4 is not set
# CONFIG_VFPV4_D16 is not set
# CONFIG_VFPV3 is not set
# CONFIG_VFPV3_D16 is not set
CONFIG_ARM_MFPU="crypto-neon-fp-armv8"
CONFIG_MFLOAT_ABI_HARD=y
# CONFIG_MFLOAT_ABI_SOFTFP is not set
CONFIG_ARM_MFLOAT_ABI="hard"
# end of Fpu configuration
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_USE_AARCH64_L1_TO_AARCH32=y
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
CONFIG_TARGET_PHYTIUMPI=y
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="phytiumpi"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="firefly"
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_FIREFLY_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
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
# end of Build setup

440
example/network/lwip_multicast/configs/phytiumpi_aarch64_firefly_lwip_multicast.config

@ -0,0 +1,440 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
CONFIG_TARGET_PHYTIUMPI=y
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="phytiumpi"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="firefly"
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_FIREFLY_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
# end of Linker Options
# end of Build setup

BIN
example/network/lwip_multicast/fig/multicast_example_result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

53
example/network/lwip_multicast/inc/lwip_multicast_example.h

@ -0,0 +1,53 @@
/*
* Copyright : (C) 2023 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_multicast_example.h
* Created Date: 2023-10-26 11:30:40
* Last Modified: 2023-10-26 19:03:36
* Description: This file is for lwip multicast example function definition.
*
* Modify History:
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 liuzhihong 2023/10/26 first release
*/
#ifndef LWIP_MULTICAST_EXAMPLE_H
#define LWIP_MULTICAST_EXAMPLE_H
/***************************** Include Files *********************************/
#include "ftypes.h"
#ifdef __cplusplus
extern "C"
{
#endif
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
/* entry function for lwip multicast example */
int LwipMulticastCreate(void);
void LwipMulticastDeinit(void);
#ifdef __cplusplus
}
#endif
#endif

57
example/network/lwip_multicast/inc/lwip_timer.h

@ -0,0 +1,57 @@
/*
* Copyright : (C) 2023 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: timer.h
* Created Date: 2023-10-07 10:04:02
* Last Modified: 2023-10-11 15:04:08
* Description: This file is for lwip timer function definition.
*
* Modify History:
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 liuzhihong 2023/10/8 first release
*/
#ifndef LWIP_TIMER_H
#define LWIP_TIMER_H
/***************************** Include Files *********************************/
#include "ftypes.h"
#ifdef __cplusplus
extern "C"
{
#endif
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
/* entry function for lwip timer example */
#ifdef CONFIG_USE_LETTER_SHELL
void TimerLoop(void);
#else
void TimerStaticInit(void);
void TimerStaticLoop(u32 time);
#endif
#ifdef __cplusplus
}
#endif
#endif

64
example/network/lwip_multicast/main.c

@ -0,0 +1,64 @@
/*
* Copyright : (C) 2023 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
* Created Date: 2023-10-26 11:30:40
* Last Modified: 2023-10-31 10:39:29
* Description: This file is for lwip multicast example main functions.
*
* Modify History:
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 liuzhihong 2023/10/26 first release
*/
/***************************** Include Files *********************************/
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#warning "Please include sdkconfig.h"
#endif
#ifdef CONFIG_USE_LETTER_SHELL
#include "shell_port.h"
#endif
#include "lwip_multicast_example.h"
#include "lwip_timer.h"
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
/************************** Function *****************************************/
int main()
{
#ifdef CONFIG_USE_LETTER_SHELL
/* if shell command is enabled, register example entry as shell command */
TimerLoop();
#else
TimerStaticInit();
LwipMulticastCreate();
TimerStaticLoop(10);
LwipMulticastDeinit();
#endif
return 0;
}

19
example/network/lwip_multicast/makefile

@ -0,0 +1,19 @@
PROJECT_DIR = $(CURDIR)
SDK_DIR ?= $(CURDIR)/../../..
USER_CSRC := main.c
USER_CSRC += $(wildcard src/*.c)
USER_INCLUDE := $(PROJECT_DIR) \
$(PROJECT_DIR)/inc
include $(SDK_DIR)/tools/build/makeall.mk
USR_BOOT_DIR ?= /mnt/d/tftboot
.PHONY:image
image:
make all -j
cp ./$(IMAGE_OUT_NAME).elf $(USR_BOOT_DIR)/baremetal.elf
cp ./$(IMAGE_OUT_NAME).bin $(USR_BOOT_DIR)/baremetal.bin

440
example/network/lwip_multicast/sdkconfig

@ -0,0 +1,440 @@
CONFIG_USE_BAREMETAL=y
#
# Arch configuration
#
CONFIG_TARGET_ARMv8=y
CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
#
# Compiler configuration
#
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
#
# Soc configuration
#
CONFIG_TARGET_PHYTIUMPI=y
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="phytiumpi"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
CONFIG_F64BIT_MEMORY_LENGTH=0x800000000
CONFIG_TARGET_E2000=y
# CONFIG_USE_SPINLOCK is not set
CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set
# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set
# end of Soc configuration
#
# Board Configuration
#
CONFIG_BOARD_NAME="firefly"
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_FIREFLY_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
#
# Build project name
#
CONFIG_TARGET_NAME="lwip_multicast"
# end of Build project name
# end of Board Configuration
#
# Sdk common configuration
#
# 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_ERROR=y
# CONFIG_LOG_NONE is not set
# CONFIG_LOG_EXTRA_INFO is not set
# CONFIG_LOG_DISPALY_CORE_NUM is not set
# CONFIG_BOOTUP_DEBUG_PRINTS is not set
CONFIG_USE_DEFAULT_INTERRUPT_CONFIG=y
CONFIG_INTERRUPT_ROLE_MASTER=y
# CONFIG_INTERRUPT_ROLE_SLAVE is not set
# end of Sdk common configuration
#
# Image information configuration
#
# CONFIG_IMAGE_INFO is not set
# end of Image information configuration
#
# Drivers configuration
#
CONFIG_USE_IOMUX=y
# CONFIG_ENABLE_IOCTRL is not set
CONFIG_ENABLE_IOPAD=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
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
# CONFIG_USE_MEDIA is not set
# CONFIG_USE_SCMI_MHU is not set
# CONFIG_USE_I2S is not set
# end of Drivers configuration
#
# Third-party configuration
#
CONFIG_USE_LWIP=y
#
# LWIP Configuration
#
#
# LWIP Port Configuration
#
CONFIG_LWIP_FXMAC=y
# CONFIG_LWIP_FGMAC is not set
# CONFIG_LWIP_FSDIF is not set
# CONFIG_LWIP_RX_POLL is not set
# end of LWIP Port Configuration
CONFIG_LWIP_NO_SYS=y
CONFIG_LWIP_LOCAL_HOSTNAME="phytium"
#
# LWIP_APP
#
# CONFIG_USE_LWIP_APP_LWIPERF is not set
# CONFIG_USE_LWIP_APP_PING is not set
# CONFIG_USE_LWIP_APP_TFTP is not set
# end of LWIP_APP
#
# Memory configuration
#
# CONFIG_LWIP_USE_MEM_POOL is not set
CONFIG_LWIP_USE_MEM_HEAP=y
# CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set
CONFIG_MEM_SIZE=1
CONFIG_MEM_ALIGNMENT=64
# end of Memory configuration
#
# Pbuf options
#
CONFIG_PBUF_POOL_BUFSIZE=2
CONFIG_PBUF_POOL_SIZE=1
# end of Pbuf options
#
# ARP
#
CONFIG_ARP_QUEUEING_EN=y
# end of ARP
#
# 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=16
# end of IPV4
#
# ICMP
#
CONFIG_LWIP_ICMP=y
CONFIG_LWIP_MULTICAST_PING=y
CONFIG_LWIP_BROADCAST_PING=y
# end of ICMP
#
# LWIP RAW API
#
CONFIG_LWIP_RAW_API_EN=y
CONFIG_LWIP_MAX_RAW_PCBS=16
# end of LWIP RAW API
#
# DHCP
#
CONFIG_LWIP_DHCP_ENABLE=y
# 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
#
# IGMP
#
CONFIG_LWIP_IGMP_EN=y
# end of IGMP
#
# DNS
#
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# end of DNS
#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
# CONFIG_LWIP_NETBUF_RECVINFO is not set
# end of UDP
#
# TCP
#
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
# CONFIG_LWIP_WND_SCALE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
# end of TCP
#
# Network_Interface
#
# CONFIG_LWIP_NETIF_API is not set
# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set
# end of Network_Interface
#
# 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
CONFIG_LWIP_TCPIP_CORE_LOCKING=y
# 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_DEBUG_ESP_LOG is not set
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_STATE_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_UDP_DEBUG is not set
# CONFIG_LWIP_SNTP_DEBUG is not set
# CONFIG_LWIP_DNS_DEBUG is not set
# end of LWIP Configuration
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_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set
CONFIG_USE_BACKTRACE=y
# CONFIG_USE_FATFS_0_1_4 is not set
CONFIG_USE_TLSF=y
# CONFIG_USE_SPIFFS is not set
# CONFIG_USE_LITTLE_FS is not set
# CONFIG_USE_LVGL is not set
# CONFIG_USE_FREEMODBUS is not set
# CONFIG_USE_FSL_SDMMC is not set
# end of Third-party configuration
#
# Build setup
#
CONFIG_CHECK_DEPS=y
CONFIG_OUTPUT_BINARY=y
#
# Optimization options
#
# CONFIG_DEBUG_NOOPT is not set
# CONFIG_DEBUG_CUSTOMOPT is not set
CONFIG_DEBUG_FULLOPT=y
# CONFIG_DEBUG_ENABLE_ALL_WARNING is not set
CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
CONFIG_DEBUG_LINK_MAP=y
# CONFIG_CCACHE is not set
# CONFIG_ARCH_COVERAGE is not set
# CONFIG_LTO_FULL is not set
# end of Optimization options
#
# Debug options
#
# CONFIG_WALL_WARNING_ERROR is not set
# CONFIG_STRICT_PROTOTYPES is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_OUTPUT_ASM_DIS=y
# CONFIG_ENABLE_WSHADOW is not set
# CONFIG_ENABLE_WUNDEF is not set
CONFIG_DOWNGRADE_DIAG_WARNING=y
# end of Debug options
#
# Lib
#
CONFIG_USE_COMPILE_CHAIN=y
# CONFIG_USE_NEWLIB is not set
# CONFIG_USE_USER_DEFINED is not set
# end of Lib
# CONFIG_ENABLE_CXX is not set
#
# Linker Options
#
CONFIG_DEFAULT_LINKER_SCRIPT=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
# end of Linker Options
# end of Build setup

394
example/network/lwip_multicast/sdkconfig.h

@ -0,0 +1,394 @@
#ifndef SDK_CONFIG_H__
#define SDK_CONFIG_H__
#define CONFIG_USE_BAREMETAL
/* Arch configuration */
#define CONFIG_TARGET_ARMv8
#define CONFIG_ARCH_NAME "armv8"
/* Arm architecture configuration */
#define CONFIG_ARCH_ARMV8_AARCH64
/* CONFIG_ARCH_ARMV8_AARCH32 is not set */
/* Compiler configuration */
#define CONFIG_ARM_GCC_SELECT
/* CONFIG_ARM_CLANG_SELECT is not set */
#define CONFIG_TOOLCHAIN_NAME "gcc"
#define CONFIG_TARGET_ARMV8_AARCH64
#define CONFIG_ARCH_EXECUTION_STATE "aarch64"
#define CONFIG_ARM_NEON
#define CONFIG_ARM_CRC
#define CONFIG_ARM_CRYPTO
#define CONFIG_ARM_FLOAT_POINT
/* CONFIG_GCC_CODE_MODEL_TINY is not set */
#define CONFIG_GCC_CODE_MODEL_SMALL
/* CONFIG_GCC_CODE_MODEL_LARGE is not set */
/* end of Compiler configuration */
#define CONFIG_USE_CACHE
#define CONFIG_USE_MMU
#define CONFIG_BOOT_WITH_FLUSH_CACHE
/* CONFIG_MMU_DEBUG_PRINTS is not set */
#define CONFIG_FPEN
/* end of Arm architecture configuration */
/* end of Arch configuration */
/* Soc configuration */
#define CONFIG_TARGET_PHYTIUMPI
/* CONFIG_TARGET_E2000Q is not set */
/* CONFIG_TARGET_E2000D is not set */
/* CONFIG_TARGET_E2000S is not set */
/* CONFIG_TARGET_FT2004 is not set */
/* CONFIG_TARGET_D2000 is not set */
#define CONFIG_SOC_NAME "phytiumpi"
#define CONFIG_SOC_CORE_NUM 4
#define CONFIG_F32BIT_MEMORY_ADDRESS 0x80000000
#define CONFIG_F32BIT_MEMORY_LENGTH 0x80000000
#define CONFIG_F64BIT_MEMORY_ADDRESS 0x2000000000
#define CONFIG_F64BIT_MEMORY_LENGTH 0x800000000
#define CONFIG_TARGET_E2000
/* CONFIG_USE_SPINLOCK is not set */
#define CONFIG_DEFAULT_DEBUG_PRINT_UART1
/* CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set */
/* CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set */
/* end of Soc configuration */
/* Board Configuration */
#define CONFIG_BOARD_NAME "firefly"
/* CONFIG_USE_SPI_IOPAD is not set */
/* CONFIG_USE_GPIO_IOPAD is not set */
/* CONFIG_USE_CAN_IOPAD is not set */
/* CONFIG_USE_QSPI_IOPAD is not set */
/* CONFIG_USE_PWM_IOPAD is not set */
/* CONFIG_USE_MIO_IOPAD is not set */
/* CONFIG_USE_TACHO_IOPAD is not set */
/* CONFIG_USE_UART_IOPAD is not set */
/* CONFIG_USE_THIRD_PARTY_IOPAD is not set */
#define CONFIG_FIREFLY_DEMO_BOARD
/* IO mux configuration when board start up */
/* end of IO mux configuration when board start up */
/* CONFIG_CUS_DEMO_BOARD is not set */
/* Build project name */
#define CONFIG_TARGET_NAME "lwip_multicast"
/* end of Build project name */
/* end of Board Configuration */
/* Sdk common configuration */
/* 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_ERROR
/* CONFIG_LOG_NONE is not set */
/* CONFIG_LOG_EXTRA_INFO is not set */
/* CONFIG_LOG_DISPALY_CORE_NUM is not set */
/* CONFIG_BOOTUP_DEBUG_PRINTS is not set */
#define CONFIG_USE_DEFAULT_INTERRUPT_CONFIG
#define CONFIG_INTERRUPT_ROLE_MASTER
/* CONFIG_INTERRUPT_ROLE_SLAVE is not set */
/* end of Sdk common configuration */
/* Image information configuration */
/* CONFIG_IMAGE_INFO is not set */
/* end of Image information configuration */
/* Drivers configuration */
#define CONFIG_USE_IOMUX
/* CONFIG_ENABLE_IOCTRL is not set */
#define CONFIG_ENABLE_IOPAD
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#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 */
/* CONFIG_USE_MEDIA is not set */
/* CONFIG_USE_SCMI_MHU is not set */
/* CONFIG_USE_I2S is not set */
/* end of Drivers configuration */
/* Third-party configuration */
#define CONFIG_USE_LWIP
/* LWIP Configuration */
/* LWIP Port Configuration */
#define CONFIG_LWIP_FXMAC
/* CONFIG_LWIP_FGMAC is not set */
/* CONFIG_LWIP_FSDIF is not set */
/* CONFIG_LWIP_RX_POLL is not set */
/* end of LWIP Port Configuration */
#define CONFIG_LWIP_NO_SYS
#define CONFIG_LWIP_LOCAL_HOSTNAME "phytium"
/* LWIP_APP */
/* CONFIG_USE_LWIP_APP_LWIPERF is not set */
/* CONFIG_USE_LWIP_APP_PING is not set */
/* CONFIG_USE_LWIP_APP_TFTP is not set */
/* end of LWIP_APP */
/* Memory configuration */
/* CONFIG_LWIP_USE_MEM_POOL is not set */
#define CONFIG_LWIP_USE_MEM_HEAP
/* CONFIG_LWIP_USE_MEM_HEAP_DEBUG is not set */
#define CONFIG_MEM_SIZE 1
#define CONFIG_MEM_ALIGNMENT 64
/* end of Memory configuration */
/* Pbuf options */
#define CONFIG_PBUF_POOL_BUFSIZE 2
#define CONFIG_PBUF_POOL_SIZE 1
/* end of Pbuf options */
/* ARP */
#define CONFIG_ARP_QUEUEING_EN
/* end of ARP */
/* 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 16
/* end of IPV4 */
/* ICMP */
#define CONFIG_LWIP_ICMP
#define CONFIG_LWIP_MULTICAST_PING
#define CONFIG_LWIP_BROADCAST_PING
/* end of ICMP */
/* LWIP RAW API */
#define CONFIG_LWIP_RAW_API_EN
#define CONFIG_LWIP_MAX_RAW_PCBS 16
/* end of LWIP RAW API */
/* DHCP */
#define CONFIG_LWIP_DHCP_ENABLE
/* 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 */
/* IGMP */
#define CONFIG_LWIP_IGMP_EN
/* end of IGMP */
/* DNS */
#define CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES
/* end of DNS */
/* 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 */
/* TCP */
#define CONFIG_LWIP_TCP_WND_DEFAULT 5744
#define CONFIG_LWIP_TCP_MAXRTX 12
#define CONFIG_LWIP_TCP_SYNMAXRTX 12
#define CONFIG_LWIP_TCP_QUEUE_OOSEQ
/* CONFIG_LWIP_TCP_SACK_OUT is not set */
#define CONFIG_LWIP_TCP_MSS 1440
#define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744
#define CONFIG_LWIP_TCP_OVERSIZE_MSS
/* CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set */
/* CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set */
#define CONFIG_LWIP_TCP_TMR_INTERVAL 250
#define CONFIG_LWIP_TCP_MSL 60000
/* CONFIG_LWIP_WND_SCALE is not set */
#define CONFIG_LWIP_TCP_RTO_TIME 1500
#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_RECVMBOX_SIZE 6
/* end of TCP */
/* Network_Interface */
/* CONFIG_LWIP_NETIF_API is not set */
/* CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set */
/* end of Network_Interface */
/* 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 */
#define CONFIG_LWIP_TCPIP_CORE_LOCKING
/* 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 */
#define CONFIG_LWIP_CHECKSUM_CHECK_ICMP
/* end of Checksums */
/* IPV6 */
/* CONFIG_LWIP_IPV6 is not set */
/* end of IPV6 */
#define CONFIG_LWIP_DEBUG
/* CONFIG_LWIP_DEBUG_ESP_LOG is not set */
#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_STATE_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_UDP_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_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 */
/* CONFIG_USE_AMP is not set */
/* CONFIG_USE_YMODEM is not set */
/* CONFIG_USE_SFUD is not set */
#define CONFIG_USE_BACKTRACE
/* CONFIG_USE_FATFS_0_1_4 is not set */
#define CONFIG_USE_TLSF
/* CONFIG_USE_SPIFFS is not set */
/* CONFIG_USE_LITTLE_FS is not set */
/* CONFIG_USE_LVGL is not set */
/* CONFIG_USE_FREEMODBUS is not set */
/* CONFIG_USE_FSL_SDMMC is not set */
/* end of Third-party configuration */
/* Build setup */
#define CONFIG_CHECK_DEPS
#define CONFIG_OUTPUT_BINARY
/* Optimization options */
/* CONFIG_DEBUG_NOOPT is not set */
/* CONFIG_DEBUG_CUSTOMOPT is not set */
#define CONFIG_DEBUG_FULLOPT
/* CONFIG_DEBUG_ENABLE_ALL_WARNING is not set */
#define CONFIG_DEBUG_OPT_UNUSED_SECTIONS
#define CONFIG_DEBUG_LINK_MAP
/* CONFIG_CCACHE is not set */
/* CONFIG_ARCH_COVERAGE is not set */
/* CONFIG_LTO_FULL is not set */
/* end of Optimization options */
/* Debug options */
/* CONFIG_WALL_WARNING_ERROR is not set */
/* CONFIG_STRICT_PROTOTYPES is not set */
/* CONFIG_DEBUG_SYMBOLS is not set */
/* CONFIG_FRAME_POINTER is not set */
#define CONFIG_OUTPUT_ASM_DIS
/* CONFIG_ENABLE_WSHADOW is not set */
/* CONFIG_ENABLE_WUNDEF is not set */
#define CONFIG_DOWNGRADE_DIAG_WARNING
/* end of Debug options */
/* Lib */
#define CONFIG_USE_COMPILE_CHAIN
/* CONFIG_USE_NEWLIB is not set */
/* CONFIG_USE_USER_DEFINED is not set */
/* end of Lib */
/* CONFIG_ENABLE_CXX is not set */
/* Linker Options */
#define CONFIG_DEFAULT_LINKER_SCRIPT
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_IMAGE_LOAD_ADDRESS 0x80100000
#define CONFIG_IMAGE_MAX_LENGTH 0x1000000
#define CONFIG_HEAP_SIZE 1
#define CONFIG_STACK_SIZE 0x400
#define CONFIG_FPU_STACK_SIZE 0x1000
/* end of Linker Options */
/* end of Build setup */
#endif

92
example/network/lwip_multicast/src/cmd_lwip_multicast.c

@ -0,0 +1,92 @@
/*
* Copyright : (C) 2023 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: cmd_lwip_multicast.c
* Created Date: 2023-10-26 11:30:40
* Last Modified: 2023-10-31 11:00:32
* Description: This file is for lwip multicast example cmd catalogue.
*
* Modify History:
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 liuzhihong 2023/10/26 first release
*/
/***************************** Include Files *********************************/
#include <stdio.h>
#include <string.h>
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#warning "Please include sdkconfig.h"
#endif
#ifdef CONFIG_USE_LETTER_SHELL
#include "shell.h"
#include "strto.h"
#include "lwip_multicast_example.h"
#define EXAMPLE_IDLE 0
#define MULTICAST_EXAMPLE_RUNNING 1
static u32 init_flag_mask=EXAMPLE_IDLE;
static void LwipMulticastExampleCheckState(void)
{
switch(init_flag_mask)
{
case MULTICAST_EXAMPLE_RUNNING:
printf("Lwip multicast example is running, we need to deinitialize it first! \r\n ");
LwipMulticastDeinit();
init_flag_mask=EXAMPLE_IDLE;
break;
default:
break;
}
}
/* usage info function for lwip multicast example */
static void LwipMulticastExampleUsage(void)
{
printf("Usage:\r\n");
printf("lwip multicast\r\n");
printf("-- run lwip ipv4 mode example to initialize mac controller and open multicast test \r\n");
}
/* entry function for lwip multicast example */
static int LwipMulticastExampleEntry(int argc, char *argv[])
{
int ret = 0;
/* check input args of example, exit if invaild */
if (argc < 2)
{
LwipMulticastExampleUsage();
return -1;
}
/* parser example input args and run example */
if (!strcmp(argv[1], "multicast"))
{
LwipMulticastExampleCheckState();
ret = LwipMulticastCreate();
init_flag_mask = MULTICAST_EXAMPLE_RUNNING;
}
return ret;
}
/* register command for lwip multicast example */
SHELL_EXPORT_CMD(SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), lwip, LwipMulticastExampleEntry, lwip multicast example);
#endif

200
example/network/lwip_multicast/src/lwip_multicast_example.c

@ -0,0 +1,200 @@
/*
* Copyright : (C) 2023 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_multicast_example.c
* Created Date: 2023-10-26 11:30:40
* Last Modified: 2023-11-06 16:12:32
* Description: This file is for lwip multicast example function implementation.
*
* Modify History:
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 liuzhihong 2023/10/26 first release
*/
#include <string.h>
#include <stdio.h>
#include "strto.h"
#include "sdkconfig.h"
#include "ftypes.h"
#include "fassert.h"
#include "fparameters.h"
#include "eth_board.h"
#ifndef SDK_CONFIG_H__
#error "Please include sdkconfig.h first"
#endif
#include "lwip_port.h"
#include "lwip/ip4_addr.h"
#include "lwip/init.h"
#include "netif/ethernet.h"
#include "lwip/netif.h"
#include "lwip/tcpip.h"
#include "lwip/inet.h"
#include "lwip/igmp.h"
#define ETH_NAME_PREFIX 'e'
#define CONFIG_DEFAULT_INIT(config,driver_config,instance_id,interface_type) \
.config.magic_code = LWIP_PORT_CONFIG_MAGIC_CODE, \
.config.driver_type = driver_config, \
.config.mac_instance = instance_id, \
.config.mii_interface = interface_type, \
.config.autonegotiation = 1, \
.config.phy_speed = LWIP_PORT_SPEED_1000M, \
.config.phy_duplex = LWIP_PORT_FULL_DUPLEX, \
.config.capability = LWIP_PORT_MODE_MULTICAST_ADDRESS_FILITER,
static ip4_addr_t multicast_ip;
const ip4_addr_t ip4_addr_any = IPADDR4_INIT(IPADDR_ANY);
#define IGMP_MULTICAST_IP_ADDRESS "224.10.10.3"
typedef struct
{
UserConfig lwip_mac_config;
u32 dhcp_en;
char* ipaddr;
char* netmask;
char* gw;
unsigned char mac_address[6];
struct netif netif;
} BoardMacConfig;
static BoardMacConfig board_mac_config[MAC_NUM] =
{
#if defined(MAC_NUM0)
{
CONFIG_DEFAULT_INIT(lwip_mac_config,MAC_NUM0_LWIP_PORT_TYPE,MAC_NUM0_CONTROLLER,MAC_NUM0_MII_INTERFACE)
.dhcp_en=0,
.ipaddr="192.168.4.10",
.gw="192.168.4.1",
.netmask="255.255.255.0",
.mac_address={0x98, 0x0e, 0x24, 0x00, 0x11, 0x0},
},
#endif
#if defined(MAC_NUM1)
{
CONFIG_DEFAULT_INIT(lwip_mac_config,MAC_NUM1_LWIP_PORT_TYPE,MAC_NUM1_CONTROLLER,MAC_NUM1_MII_INTERFACE)
.dhcp_en=0,
.ipaddr="192.168.4.11",
.gw="192.168.4.1",
.netmask="255.255.255.0",
.mac_address={0x98, 0x0e, 0x24, 0x00, 0x11, 0x1},
},
#endif
};
static void SetIP(ip_addr_t* ipaddr,ip_addr_t* gw,ip_addr_t* netmask,u32 mac_id)
{
if(inet_aton(board_mac_config[mac_id].ipaddr,ipaddr)==0)
printf("The addr of ipaddr is wrong\r\n");
if(inet_aton(board_mac_config[mac_id].gw,gw)==0)
printf("The addr of gw is wrong\r\n");
if(inet_aton(board_mac_config[mac_id].netmask,netmask)==0)
printf("The addr of netmask is wrong\r\n");
}
int LwipMulticastCreate(void)
{
FError ret = FT_SUCCESS;
/* mac init */
for (int i = 0; i < MAC_NUM; i++)
{
struct netif *netif_p = NULL;
ip_addr_t ipaddr,netmask, gw;
board_mac_config[i].lwip_mac_config.name[0] = ETH_NAME_PREFIX;
itoa(board_mac_config[i].lwip_mac_config.mac_instance, &(board_mac_config[i].lwip_mac_config.name[1]), 10);
/* mac ip addr set: char* -> ip_addr_t */
SetIP(&ipaddr,&gw,&netmask,i);
/* ******************************************************************* */
netif_p= &board_mac_config[i].netif;
/* Add network interface to the netif_list, and set it as default */
if (!LwipPortAdd(netif_p, &ipaddr, &netmask, &gw, board_mac_config[i].mac_address, (UserConfig *)&board_mac_config[i]))
{
printf("Error adding N/W interface %d.\n\r",board_mac_config[i].lwip_mac_config.mac_instance);
return ERR_GENERAL;
}
printf("LwipPortAdd mac_instance %d is over.\n\r",board_mac_config[i].lwip_mac_config.mac_instance);
netif_set_default(netif_p);
if (netif_is_link_up(netif_p))
{
/* 当netif完全配置好时,必须调用该函数 */
netif_set_up(netif_p);
if (board_mac_config[i].dhcp_en == 1)
{
LwipPortDhcpSet(netif_p, TRUE);
}
}
else
{
/* 当netif链接关闭时,必须调用该函数 */
netif_set_down(netif_p);
}
}
printf("Network setup complete.\n");
ret = inet_aton(IGMP_MULTICAST_IP_ADDRESS, &multicast_ip);
if (!ret) {
printf("igmp_app: Invalid Server IP address: %d\r\n",
ret);
return ERR_GENERAL;
}
ret = igmp_joingroup(&ip4_addr_any, (ip4_addr_t *)(&multicast_ip));
if (ret) {
printf("igmp_app: igmp_joingroup failed with ");
printf("error: %d\n\r", ret);
return ERR_GENERAL;
}
printf("IGMP application joined group : %s\n\r",
IGMP_MULTICAST_IP_ADDRESS);
if (ret == FT_SUCCESS)
{
printf("%s@%d: Lwip multicast example success !!! \r\n", __func__, __LINE__);
printf("[system_example_pass]\r\n");
}
else
{
printf("%s@%d: Lwip multicast example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
}
return 0;
}
void LwipMulticastDeinit(void)
{
if (igmp_leavegroup(&ip4_addr_any,(ip4_addr_t *) (&multicast_ip)))
{
printf("igmp_leavegroup failed with error: %d\n\r");
}
else
{
printf("IGMP application left group : %s\n\r",IGMP_MULTICAST_IP_ADDRESS);
}
for (int i = 0; i < MAC_NUM; i++)
{
struct netif *netif_p = NULL;
netif_p=&board_mac_config[i].netif;
LwipPortStop(netif_p,board_mac_config[i].dhcp_en);
}
}

222
example/network/lwip_multicast/src/lwip_timer.c

@ -0,0 +1,222 @@
/*
* Copyright : (C) 2023 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_timer.c
* Created Date: 2023-09-20 11:29:05
* Last Modified: 2023-11-07 10:55:40
* Description: This file is for lwip timer function implementation.
*
* Modify History:
* Ver Who Date Changes
* ----- ---------- -------- ---------------------------------
* 1.0 liuzhihong 2023/10/8 first release
*/
#include <string.h>
#include <stdio.h>
#include "strto.h"
#include "fgeneric_timer.h"
#include "ftypes.h"
#include "fparameters.h"
#include "finterrupt.h"
#include "fassert.h"
#include "timeouts.h"
#ifdef CONFIG_USE_LETTER_SHELL
#include "shell_port.h"
#endif
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#error "Please include sdkconfig.h first"
#endif
#include "lwip_port.h"
#include "lwip/ip4_addr.h"
#include "lwip/init.h"
#include "netif/ethernet.h"
#include "lwip/netif.h"
#include "lwip/tcpip.h"
#include "lwip/inet.h"
#include "lwip/dhcp.h"
#include "ifconfig.h"
#define TIMER_BASE_RATE_HZ 1000 /* 为timer_base_cnt 提供time base */
#define TIMER_INTERRUPT_PRO IRQ_PRIORITY_VALUE_3
#ifdef CONFIG_ARCH_ARMV8_AARCH64
#define MAX_TIMER_CNT 0xffffffffffffffff
#else
#define MAX_TIMER_CNT 0xffffffff
#endif
static u32 timer_base_cnt = 0;
void LwipTestLoop(void)
{
struct netif *netif;
netif = netif_list;
while (netif != NULL)
{
if (netif->state)
{
#ifdef CONFIG_LWIP_RX_POLL
LwipEthProcessLoop(netif);
#endif
LwipPortInput(netif);
LinkDetectLoop(netif);
}
netif = netif->next;
}
}
void LwipTestDhcpLoop(u32 msec)
{
LwipPortDhcpLoop(msec);
}
static void GenericTimerIntrHandler(s32 vector, void *param)
{
(void)vector;
FASSERT(param != 0);
u32 timer_base_freq = (u32)(uintptr)param;
timer_base_cnt++;
/* clear tick interrupt */
GenericTimerSetTimerValue(GENERIC_TIMER_ID0, GenericTimerFrequecy() / timer_base_freq);
}
void TimerLoopInit(void)
{
u32 cnt_frq;
timer_base_cnt = 0;
/* disable timer and get system frequency */
GenericTimerStop(GENERIC_TIMER_ID0);
cnt_frq = GenericTimerFrequecy();
/* set tick rate */
GenericTimerSetTimerValue(GENERIC_TIMER_ID0, cnt_frq / TIMER_BASE_RATE_HZ);
GenericTimerInterruptEnable(GENERIC_TIMER_ID0);
/* set generic timer interrupt */
InterruptSetPriority(GENERIC_TIMER_NS_IRQ_NUM, TIMER_INTERRUPT_PRO);
/* install tick handler */
InterruptInstall(GENERIC_TIMER_NS_IRQ_NUM, GenericTimerIntrHandler,
(void *)TIMER_BASE_RATE_HZ, "GenericTimerTick");
/* enable interrupt */
InterruptUmask(GENERIC_TIMER_NS_IRQ_NUM);
GenericTimerStart(GENERIC_TIMER_ID0);
}
#ifdef CONFIG_USE_LETTER_SHELL
void TimerLoop(void)
{
u32 _5ms_appear = 0;
u32 base_cnt_back = 0;
TimerLoopInit();
LSUserShellInit();
lwip_init(); /*lwip only init 1 times*/
while (1)
{
LSuserShellNoWaitLoop();
LwipTestLoop();
if (((timer_base_cnt % 5) == 0) && (_5ms_appear == 0)) /*5ms task */
{
_5ms_appear = 1;
LwipTestDhcpLoop(5);
}
else if ((timer_base_cnt % 5) != 0)
{
_5ms_appear = 0;
}
if(timer_base_cnt != base_cnt_back)
{
sys_check_timeouts();
base_cnt_back = timer_base_cnt;
}
}
}
#else
void TimerStaticInit(void)
{
TimerLoopInit();
lwip_init(); /*lwip only init 1 times*/
}
/**
* @name: TimerStaticLoop
* @msg: time时间内进行网卡数据收发
* @return void
* @note:
* @param {u32} time
*/
void TimerStaticLoop(u32 time)
{
u32 _5ms_appear = 0;
u32 base_cnt_back = 0;
u32 timer_start=0;
u32 time_pass_cnt=0;
u32 time_cnt;
u32 old = 0;
time_cnt = time * GenericTimerFrequecy();
timer_start = GenericTimerRead(GENERIC_TIMER_ID0);
while (time_pass_cnt<time_cnt)
{
LwipTestLoop();
if (((timer_base_cnt % 5) == 0) && (_5ms_appear == 0)) /*5ms task */
{
_5ms_appear = 1;
LwipTestDhcpLoop(5);
}
else if ((timer_base_cnt % 5) != 0)
{
_5ms_appear = 0;
}
if(timer_base_cnt != base_cnt_back)
{
sys_check_timeouts();
base_cnt_back = timer_base_cnt;
}
if(GenericTimerRead(GENERIC_TIMER_ID0)>timer_start)
time_pass_cnt = GenericTimerRead(GENERIC_TIMER_ID0)-timer_start;
else
time_pass_cnt = GenericTimerRead(GENERIC_TIMER_ID0)+(MAX_TIMER_CNT-timer_start);
if(old != time-time_pass_cnt/GenericTimerFrequecy())
{
printf("Only left %d seconds\r\n", time-time_pass_cnt/GenericTimerFrequecy());
old = time-time_pass_cnt/GenericTimerFrequecy();
}
}
ListIf();
}
#endif
u32_t sys_now(void)
{
return timer_base_cnt;
}

61
example/peripherals/can/can/README.md

@ -2,30 +2,39 @@
## 1. 例程介绍
><font size="1">介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作</font><br />
> `<font size="1">`介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作 `</font><br />`
CAN中断模式回环测试例程 (can_intr_loopback_mode_example.c)
- 初始化CAN0,CAN1基本配置并开启所有中断,仲裁域波特率和数据域波特率均配置为 1M/S
- 初始化CAN0,CAN1基本配置并开启所有中断,仲裁域波特率和数据域波特率均配置为 500K/S
- CAN0向CAN1发送30次标准帧数据,触发CAN1接收中断,在接收中断服务函数中完成对CAN0已发送帧的接收,并比对发送帧和接收帧是否相同
- CAN1向CAN0发送30次标准帧数据,触发CAN0接收中断,在接收中断服务函数中完成对CAN1已发送帧的接收,并比对发送帧和接收帧是否相同
- 以上两次收发测试完成后,关闭中断,去初始化CAN0,CAN1
- CAN0向CAN1发送30次扩展帧数据,触发CAN1接收中断,在接收中断服务函数中完成对CAN0已发送帧的接收,并比对发送帧和接收帧是否相同
- CAN1向CAN0发送30次扩展帧数据,触发CAN0接收中断,在接收中断服务函数中完成对CAN1已发送帧的接收,并比对发送帧和接收帧是否相同
- 以上收发测试完成后,关闭中断,去初始化CAN0,CAN1
CAN轮询模式回环测试例程 (can_polled_loopback_mode_example.c)
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率均配置为 1M/S
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率均配置为 500K/S
- CAN0发送,CAN1接收,循环收发30次标准帧。并比对发送帧和接收帧是否相同
- CAN1发送,CAN0接收,循环收发30次标准帧。并比对发送帧和接收帧是否相同
- 以上两次收发测试完成后,去初始化CAN0,CAN1
- CAN0发送,CAN1接收,循环收发30次扩展帧。并比对发送帧和接收帧是否相同
- CAN1发送,CAN0接收,循环收发30次扩展帧。并比对发送帧和接收帧是否相同
- 以上收发测试完成后,去初始化CAN0,CAN1
CAN过滤功能测试例程 (can_id_filter_example.c)
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率均配置为 1M/S,过滤模式配置为只可接收id为0x02的帧
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率均配置为 500K/S,过滤模式配置为只可接收id为0x02的帧
- CAN0向CAN1发送id=0x02的标准帧,CAN1接收成功,然后发送id=0x01的标准帧,CAN1接收失败,表示id=0x01成功被过滤
- CAN0向CAN1发送id=0x02的扩展帧,CAN1接收成功,然后发送id=0x01的扩展帧,CAN1接收失败,表示id=0x01成功被过滤
- 以上收发测试完成后,去初始化CAN0,CAN1
## 2. 如何使用例程
><font size="1">描述开发平台准备,使用例程配置,构建和下载镜像的过程</font><br />
> `<font size="1">`描述开发平台准备,使用例程配置,构建和下载镜像的过程 `</font><br />`
本例程需要以下硬件
- E2000D Demo,FT2000/4,D2000
- 串口线和串口上位机
- CAN连接头
@ -33,7 +42,8 @@ CAN过滤功能测试例程 (can_id_filter_example.c)
### 2.1 硬件配置方法
><font size="1">哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出)</font><br />
> `<font size="1">`哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出)`</font><br />`
- 使用杜邦线连接CAN0_H和CAN1_H,CAN0_L和CAN1_L,CAN0_GND和CAN1_GND
- 将CAN回环接头,接入开发板CAN接口即可
- 如下图所示
@ -42,36 +52,39 @@ CAN过滤功能测试例程 (can_id_filter_example.c)
### 2.2 SDK配置方法
><font size="1">依赖哪些驱动、库和第三方组件,如何完成配置(列出需要使能的关键配置项)</font><br />
> `<font size="1">`依赖哪些驱动、库和第三方组件,如何完成配置(列出需要使能的关键配置项)`</font><br />`
使能例程所需的配置
- Letter Shell组件,依赖 USE_LETTER_SHELL
- CAN组件,依赖CONFIG_USE_FCAN
对应的配置项是,
- Use FCAN
- Use FIOMUX
- 本例子已经提供好具体的编译指令,以下进行介绍:
1. make all 将目录下的工程进行编译
2. make clean 将目录下的工程进行清理
3. make image 将目录下的工程进行编译,并将生成的elf 复制到目标地址
4. make list_kconfig 当前工程支持哪些配置文件
5. make load_kconfig LOAD_CONFIG_NAME=<kconfig configuration files> 将预设配置加载至工程中
5. make load_kconfig LOAD_CONFIG_NAME=`<kconfig configuration files>` 将预设配置加载至工程中
6. make menuconfig 配置目录下的参数变量
7. make backup_kconfig 将目录下的sdkconfig 备份到./configs下
- 具体使用方法为:
- 在当前目录下
- 执行以上指令
### 2.3 构建和下载
><font size="1">描述构建、烧录下载镜像的过程,列出相关的命令</font><br />
> `<font size="1">`描述构建、烧录下载镜像的过程,列出相关的命令 `</font><br />`
- 在host侧完成配置
>配置成E2000D,对于其它平台,使用对应的默认配置,如E2000d 32位:
> 配置成E2000D,对于其它平台,使用对应的默认配置,如E2000d 32位:
```
$ make load_kconfig LOAD_CONFIG_NAME=e2000d_aarch32_demo_can
```
@ -100,31 +113,39 @@ bootelf -p 0x90100000
### 2.4 输出与实验现象
><font size="1">描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片)</font><br />
> `<font size="1">`描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片)`</font><br />`
#### 2.4.1 CAN中断模式回环测试例程
```
$ can intr
```
can2.0协议下测试
![can_intr](./fig/can_intr.png)
#### 2.4.2 CAN轮询模式回环测试例程
```
$ can polled
```
can2.0协议下测试
![can_polled](./fig/can_polled.png)
#### 2.4.3 CAN过滤功能测试例程
```
$ can filter
```
can2.0协议下测试
![can_filter](./fig/can_filter.png)
## 3. 如何解决问题
><font size="1">主要记录使用例程中可能会遇到的问题,给出相应的解决方案</font><br />
> `<font size="1">`主要记录使用例程中可能会遇到的问题,给出相应的解决方案 `</font><br />`
## 4. 修改历史记录
><font size="1">记录例程的重大修改记录,标明修改发生的版本号 </font><br />
> `<font size="1">`记录例程的重大修改记录,标明修改发生的版本号 `</font><br />`

BIN
example/peripherals/can/can/fig/can_filter.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
example/peripherals/can/can/fig/can_intr.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
example/peripherals/can/can/fig/can_polled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 19 KiB

7
example/peripherals/can/can/inc/can_common.h

@ -20,6 +20,7 @@
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/17 first release
* 1.1 huangjin 2023/11/01 add macro definition
*/
#ifndef CAN_COMMON_H
#define CAN_COMMON_H
@ -39,12 +40,14 @@ extern "C"
#define CAN_TEST_SEND_ID 0x23
#define CAN_TEST_SEND_LENGTH 8
#define CAN_TEST_SEND_STID_LENGTH 8
#define CAN_TEST_SEND_EXID_LENGTH 16
#define CAN_LOOPBACK_TEST_TIMES 30
#define CAN_LOOPBACK_TEST_PERIAD_MS 100
#define CAN_ID_FILTER_TEST_TIMES 2
#define CAN_TEST_ARB_BAUD_RATE 1000000
#define CAN_TEST_DATA_BAUD_RATE 1000000
#define CAN_TEST_ARB_BAUD_RATE 500000
#define CAN_TEST_DATA_BAUD_RATE 500000
#ifdef __cplusplus
}

3
example/peripherals/can/can/main.c

@ -60,8 +60,9 @@ int main()
FCanPolledLoopbackExample();
#if defined(CONFIG_TARGET_E2000)
FCanIdFilterExample();
#endif
}
#endif

71
example/peripherals/can/can/src/can_id_filter_example.c

@ -20,6 +20,7 @@
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.1 huangjin 2023/11/01 improve functions
*/
/***************************** Include Files *********************************/
@ -64,6 +65,8 @@ int FCanIdFilterExample()
int filter_flag = 0;
int send_times = 0;
int i = 0;
printf("Use can2.0 protocol!\n");
/*init iomux*/
FIOMuxInit();
for (can_id = FCAN0_ID; can_id < FCAN_NUM ; can_id++)
@ -76,7 +79,6 @@ int FCanIdFilterExample()
FCAN_TEST_DEBUG("Can%d Initialize error.", can_id);
return FCAN_FAILURE;
}
/*disable canfd, configured as can mode*/
FCanFdEnable(&can[can_id], FALSE);
/*set to normal mode*/
@ -111,15 +113,28 @@ int FCanIdFilterExample()
FCAN_TEST_ERROR("Can%d set data segment baudrate error.", can_id);
return FCAN_FAILURE;
}
}
/* 首先测试标准帧,再测试扩展帧 */
u8 ide_flag = 0;
for(ide_flag = 0 ; ide_flag < 2; ide_flag++)
{
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* set filter,and configured can to receive only ID 0x02 frame*/
FCanIdMaskConfig id_mask;
FCanEnable(&can[can_id], FALSE);
memset(&id_mask, 0, sizeof(id_mask));
for (int i = 0; i < FCAN_ACC_ID_REG_NUM; i++)
{
id_mask.filter_index = i;
/* 只接收发送id=0x02的帧 */
id_mask.id = 0x02;
id_mask.mask = 0;
if ( ide_flag == 1 )
{
id_mask.type = EXTEND_FRAME;
}
ret |= FCanIdMaskFilterSet(&can[can_id], &id_mask);
}
if (ret != FCAN_SUCCESS)
@ -127,8 +142,7 @@ int FCanIdFilterExample()
FCAN_TEST_ERROR("Can%d set mask filter error", can_id);
return FCAN_FAILURE;
}
/*Identifier mask enable*/
/* Identifier mask enable */
FCanIdMaskFilterEnable(&can[can_id]);
/*can enable*/
FCanEnable(&can[can_id], TRUE);
@ -139,8 +153,17 @@ int FCanIdFilterExample()
memset(&send_frame, 0, sizeof(FCanFrame));
/*set the canid = 0x02 first time ,and set the canid = 0x01 second time */
send_frame.canid = (send_times == 0)? 0x02:0x01;
send_frame.candlc = CAN_TEST_SEND_STID_LENGTH;
if (ide_flag == 0)
{
send_frame.canid &= CAN_SFF_MASK;
send_frame.candlc = CAN_TEST_SEND_LENGTH;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
for (i = 0; i < send_frame.candlc; i++)
{
send_frame.data[i] = i + 0x01 ;
@ -159,12 +182,16 @@ int FCanIdFilterExample()
ret = FCanRecv(instance_p, &recv_frame);
if (ret == FT_SUCCESS)
{
for (i = 0; i < CAN_TEST_SEND_LENGTH; i++)
for (i = 0; i < send_frame.candlc; i++)
{
if (recv_frame.data[i] != send_frame.data[i])
{
filter_flag = 1;
}
else
{
filter_flag = 0;
}
}
}
else
@ -175,20 +202,44 @@ int FCanIdFilterExample()
if (filter_flag == 1)
{
if (send_frame.canid == 1)
if (ide_flag == 0)
{
if (send_frame.canid == 0x01)
{
printf("The frame id %x was filtered successfully.\n", send_frame.canid);
printf("The standard frame id 0x%02x was filtered successfully.\n", send_frame.canid);
}
else
{
FCAN_TEST_ERROR("Test failed, the frame id %x should not be filtered!\n",send_frame.canid);
FCAN_TEST_ERROR("Test failed, the standard frame id 0x%02x should not be filtered!\n",send_frame.canid);
ret = FCAN_FAILURE;
break;
}
}
else
{
printf("The frame id %x was receved successfully.\n", send_frame.canid);
if (send_frame.canid == 0x80000001)
{
printf("The extern frame id 0x%02x was filtered successfully.\n", send_frame.canid);
}
else
{
FCAN_TEST_ERROR("Test failed, the extern frame id 0x%02x should not be filtered!\n",send_frame.canid);
ret = FCAN_FAILURE;
break;
}
}
}
else
{
if (ide_flag == 0)
{
printf("The standard frame id 0x%02x was receved successfully.\n", send_frame.canid);
}
else
{
printf("The extern frame id 0x%02x was receved successfully.\n", send_frame.canid);
}
}
}
}
@ -207,7 +258,7 @@ int FCanIdFilterExample()
}
else
{
printf("%s@%d: can id filter example example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
printf("%s@%d: can id filter example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
return FCAN_FAILURE;
}

48
example/peripherals/can/can/src/can_intr_loopback_mode_example.c

@ -20,6 +20,7 @@
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.1 huangjin 2023/11/01 improve functions
*/
/***************************** Include Files *********************************/
@ -103,7 +104,10 @@ static void FCanRxIrqCallback(void *args)
can0_recv_times++;
if (can0_recv_times == CAN_LOOPBACK_TEST_TIMES)
{
printf("\r\nCan 0 recv is equal to can 1 send, can0_recv_times=%d\r\n", can0_recv_times);
if((recv_frame.canid & CAN_EFF_FLAG) == 0)
printf("Can 0 recv is equal to can 1 send, use standard frame, can0_recv_times=%d.\n", can0_recv_times);
else
printf("Can 0 recv is equal to can 1 send, use extern frame, can0_recv_times=%d.\n", can0_recv_times);
can0_recv_irq_flag = 1;
can0_recv_times = 0;
}
@ -136,7 +140,10 @@ static void FCanRxIrqCallback(void *args)
can1_recv_times++;
if (can1_recv_times == CAN_LOOPBACK_TEST_TIMES)
{
printf("\r\nCan 1 recv is equal to can 0 send, can1_recv_times=%d\r\n", can1_recv_times);
if((recv_frame.canid & CAN_EFF_FLAG) == 0)
printf("Can 1 recv is equal to can 0 send, use standard frame, can1_recv_times=%d.\n", can1_recv_times);
else
printf("Can 1 recv is equal to can 0 send, use extern frame, can1_recv_times=%d.\n", can1_recv_times);
can1_recv_irq_flag = 1;
can1_recv_times = 0;
}
@ -254,6 +261,8 @@ int FCanIntrLoopbackExample()
FCanCtrl *instance_p;
int send_times = 0;
int i = 0;
printf("Use can2.0 protocol!\n");
/*init iomux*/
FIOMuxInit();
for (can_id = FCAN0_ID; can_id < FCAN_NUM ; can_id++)
@ -271,7 +280,7 @@ int FCanIntrLoopbackExample()
/*set to normal mode*/
FCanSetMode(&can[can_id], FCAN_PROBE_NORMAL_MODE);
}
/*Baud rate is configured as 1M*/
/*Baud rate is configured as 500K*/
FCanBaudrateConfig arb_segment_config;
FCanBaudrateConfig data_segment_config;
memset(&arb_segment_config, 0, sizeof(arb_segment_config));
@ -301,14 +310,26 @@ int FCanIntrLoopbackExample()
return FCAN_FAILURE;
}
}
/* 首先测试标准帧,再测试扩展帧 */
u8 ide_flag = 0;
for(ide_flag = 0 ; ide_flag < 2; ide_flag++)
{
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* set filter */
FCanIdMaskConfig id_mask;
FCanEnable(&can[can_id], FALSE);
memset(&id_mask, 0, sizeof(id_mask));
for (int i = 0; i < FCAN_ACC_ID_REG_NUM; i++)
{
id_mask.filter_index = i;
id_mask.id = 0;
id_mask.mask = FCAN_ACC_IDN_MASK;
if ( ide_flag == 1 )
{
id_mask.type = EXTEND_FRAME;
}
ret |= FCanIdMaskFilterSet(&can[can_id], &id_mask);
}
@ -329,8 +350,16 @@ int FCanIntrLoopbackExample()
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
memset(&send_frame, 0, sizeof(FCanFrame));
send_frame.canid = CAN_TEST_SEND_ID;
send_frame.candlc = CAN_TEST_SEND_STID_LENGTH;
if (ide_flag == 0)
{
send_frame.canid &= CAN_SFF_MASK;
send_frame.candlc = CAN_TEST_SEND_LENGTH;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
/* can 0 send, can 1 receive */
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
@ -350,8 +379,16 @@ int FCanIntrLoopbackExample()
memset(&send_frame, 0, sizeof(FCanFrame));
send_frame.canid = CAN_TEST_SEND_ID;
send_frame.candlc = CAN_TEST_SEND_STID_LENGTH;
if (ide_flag == FALSE)
{
send_frame.canid &= CAN_SFF_MASK;
send_frame.candlc = CAN_TEST_SEND_LENGTH;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
for (i = 0; i < send_frame.candlc; i++)
@ -367,6 +404,7 @@ int FCanIntrLoopbackExample()
}
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
}
}
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{

38
example/peripherals/can/can/src/can_polled_loopback_mode_example.c

@ -20,6 +20,7 @@
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.1 huangjin 2023/11/01 improve functions
*/
/***************************** Include Files *********************************/
@ -34,7 +35,6 @@
#include "ftypes.h"
#include "can_common.h"
#include "can_polled_loopback_mode_example.h"
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#warning "Please include sdkconfig.h"
@ -62,6 +62,8 @@ int FCanPolledLoopbackExample()
FCanCtrl *instance_p;
int send_times = 0;
int i = 0;
printf("Use can2.0 protocol!\n");
/*init iomux*/
FIOMuxInit();
for (can_id = FCAN0_ID; can_id < FCAN_NUM ; can_id++)
@ -107,14 +109,26 @@ int FCanPolledLoopbackExample()
FCAN_TEST_ERROR("Can%d set data segment baudrate error.", can_id);
return FCAN_FAILURE;
}
}
/* 首先测试标准帧,再测试扩展帧 */
u8 ide_flag = 0;
for(ide_flag = 0 ; ide_flag < 2; ide_flag++)
{
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* set filter */
FCanIdMaskConfig id_mask;
FCanEnable(&can[can_id], FALSE);
memset(&id_mask, 0, sizeof(id_mask));
for (int i = 0; i < FCAN_ACC_ID_REG_NUM; i++)
{
id_mask.filter_index = i;
id_mask.id = 0;
id_mask.mask = FCAN_ACC_IDN_MASK;
if ( ide_flag == 1 )
{
id_mask.type = EXTEND_FRAME;
}
ret |= FCanIdMaskFilterSet(&can[can_id], &id_mask);
}
if (ret != FCAN_SUCCESS)
@ -130,8 +144,16 @@ int FCanPolledLoopbackExample()
memset(&send_frame, 0, sizeof(FCanFrame));
send_frame.canid = CAN_TEST_SEND_ID;
send_frame.candlc = CAN_TEST_SEND_STID_LENGTH;
if (ide_flag == 0)
{
send_frame.canid &= CAN_SFF_MASK;
send_frame.candlc = CAN_TEST_SEND_LENGTH;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
/* can 0 send, can 1 receive */
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
@ -166,7 +188,10 @@ int FCanPolledLoopbackExample()
return FCAN_FAILURE;
}
}
printf("Can 1 recv is equal to can 0 send.\n");
if(ide_flag == 0)
printf("Can 1 recv is equal to can 0 send, use standard frame.\n");
else
printf("Can 1 recv is equal to can 0 send, use extern frame.\n");
/* can 1 send, can 0 receive */
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
@ -201,7 +226,12 @@ int FCanPolledLoopbackExample()
return FCAN_FAILURE;
}
}
printf("Can 0 recv is equal to can 1 send.\n");
if(ide_flag == 0)
printf("Can 0 recv is equal to can 1 send, use standard frame.\n");
else
printf("Can 0 recv is equal to can 1 send, use extern frame.\n");
}
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/*can deinit */

4
example/peripherals/can/can/src/cmd_can.c

@ -46,8 +46,10 @@ static void FCanExampleUsage(void)
printf("-- run can interrupt loopback mode example at controller \r\n");
printf("can polled \r\n");
printf("-- run can polled loopback mode example at controller\r\n");
#if defined(CONFIG_TARGET_E2000)
printf("can filter \r\n");
printf("-- run can id filter example at controller\r\n");
#endif
}
/* entry function for can example */
@ -74,10 +76,12 @@ static int FCanExampleEntry(int argc, char *argv[])
ret = FCanPolledLoopbackExample();
}
#if defined(CONFIG_TARGET_E2000)
if (!strcmp(argv[1], "filter"))
{
ret = FCanIdFilterExample();
}
#endif
return ret;
}

84
example/peripherals/can/canfd/README.md

@ -2,32 +2,48 @@
## 1. 例程介绍
><font size="1">介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作</font><br />
> `<font size="1">`介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作 `</font><br />`
CANFD中断模式回环测试例程 (canfd_intr_loopback_mode_example.c)
- 初始化CAN0,CAN1基本配置并开启所有中断,仲裁域波特率和数据域波特率均配置为 500K/S
- CAN0向CAN1发送30次标准帧数据,触发CAN1接收中断,在接收中断服务函数中完成对CAN0已发送帧的接收,并比对发送帧和接收帧是否相同
- CAN1向CAN0发送30次标准帧数据,触发CAN0接收中断,在接收中断服务函数中完成对CAN1已发送帧的接收,并比对发送帧和接收帧是否相同
- CAN0向CAN1发送30次扩展帧数据,触发CAN1接收中断,在接收中断服务函数中完成对CAN0已发送帧的接收,并比对发送帧和接收帧是否相同
- CAN1向CAN0发送30次扩展帧数据,触发CAN0接收中断,在接收中断服务函数中完成对CAN1已发送帧的接收,并比对发送帧和接收帧是否相同
- 以上收发测试完成后,关闭中断,去初始化CAN0,CAN1
CANFD轮询模式回环测试例程 (canfd_polled_loopback_mode_example.c)
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率配置为 1M/S+2M/S
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率均配置为 500K/S
- CAN0发送,CAN1接收,循环收发30次标准帧。并比对发送帧和接收帧是否相同
- CAN1发送,CAN0接收,循环收发30次标准帧。并比对发送帧和接收帧是否相同
- CAN0发送,CAN1接收,循环收发30次扩展帧。并比对发送帧和接收帧是否相同
- CAN1发送,CAN0接收,循环收发30次扩展帧。并比对发送帧和接收帧是否相同
- 以上两次收发测试完成后,去初始化CAN0,CAN1
- 以上收发测试完成后,去初始化CAN0,CAN1
CANFD过滤功能测试例程 (canfd_id_filter_example.c)
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率配置为 1M/S+2M/S,过滤模式配置为只可接收id为0x02的帧
- 初始化CAN0,CAN1基本配置,仲裁域波特率和数据域波特率均配置为 500K/S,过滤模式配置为只可接收id为0x02的帧
- CAN0向CAN1发送id=0x02的标准帧,CAN1接收成功,然后发送id=0x01的标准帧,CAN1接收失败,表示id=0x01成功被过滤
- CAN0向CAN1发送id=0x02的扩展帧,CAN1接收成功,然后发送id=0x01的扩展帧,CAN1接收失败,表示id=0x01成功被过滤
- 以上收发测试完成后,去初始化CAN0,CAN1
## 2. 如何使用例程
><font size="1">描述开发平台准备,使用例程配置,构建和下载镜像的过程</font><br />
> `<font size="1">`描述开发平台准备,使用例程配置,构建和下载镜像的过程 `</font><br />`
本例程需要以下硬件
- E2000D Demo,E2000D TestB
- E2000D Demo,E2000Q
- 串口线和串口上位机
- CAN连接头
- 杜邦线
### 2.1 硬件配置方法
><font size="1">哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出)</font><br />
> `<font size="1">`哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出)`</font><br />`
- 使用杜邦线连接CAN0_H和CAN1_H,CAN0_L和CAN1_L,CAN0_GND和CAN1_GND
- 将CAN回环接头,接入开发板CAN接口即可
- 如下图所示
@ -36,41 +52,39 @@ CANFD过滤功能测试例程 (canfd_id_filter_example.c)
### 2.2 SDK配置方法
><font size="1">依赖哪些驱动、库和第三方组件,如何完成配置(列出需要使能的关键配置项)</font><br />
> `<font size="1">`依赖哪些驱动、库和第三方组件,如何完成配置(列出需要使能的关键配置项)`</font><br />`
使能例程所需的配置
- Letter Shell组件,依赖 USE_LETTER_SHELL
- CAN组件,依赖CONFIG_USE_FCAN
- CANFD组件,依赖CONFIG_FCAN_USE_CANFD
对应的配置项是,
- Use FCAN
- Use CanFD
![menuconfig](./fig/menuconfig.png)
- Use FCAN
- Use FIOMUX
- 本例子已经提供好具体的编译指令,以下进行介绍:
1. make 将目录下的工程进行编译
1. make all 将目录下的工程进行编译
2. make clean 将目录下的工程进行清理
3. make image 将目录下的工程进行编译,并将生成的elf 复制到目标地址
4. make list_kconfig 当前工程支持哪些配置文件
5. make load_kconfig LOAD_CONFIG_NAME=<kconfig configuration files> 将预设配置加载至工程中
5. make load_kconfig LOAD_CONFIG_NAME=`<kconfig configuration files>` 将预设配置加载至工程中
6. make menuconfig 配置目录下的参数变量
7. make backup_kconfig 将目录下的sdkconfig 备份到./configs下
- 具体使用方法为:
- 在当前目录下
- 执行以上指令
### 2.3 构建和下载
><font size="1">描述构建、烧录下载镜像的过程,列出相关的命令</font><br />
> `<font size="1">`描述构建、烧录下载镜像的过程,列出相关的命令 `</font><br />`
- 在host侧完成配置
>配置成E2000D,对于其它平台,使用对应的默认配置,如E2000d 32位:
> 配置成E2000D,对于其它平台,使用对应的默认配置,如E2000d 32位:
```
$ make load_kconfig LOAD_CONFIG_NAME=e2000d_aarch32_demo_canfd
```
@ -99,27 +113,39 @@ bootelf -p 0x90100000
### 2.4 输出与实验现象
><font size="1">描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片)</font><br />
> `<font size="1">`描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片)`</font><br />`
#### 2.4.1 CANFD中断模式回环测试例程
```
$ canfd intr
```
canfd协议下测试
![can_intr](./fig/canfd_intr.png)
#### 2.4.2 CANFD轮询模式回环测试例程
#### 2.4.1 CANFD轮询模式回环测试例程
```
$ canfd polled
```
![canfd_polled](./fig/canfd_polled.png)
#### 2.4.2 CANFD过滤功能测试例程
canfd协议下测试
![can_polled](./fig/canfd_polled.png)
#### 2.4.3 CANFD过滤功能测试例程
```
$ canfd filter
```
![canfd_filter](./fig/canfd_filter.png)
canfd协议下测试
![can_filter](./fig/canfd_filter.png)
## 3. 如何解决问题
><font size="1">主要记录使用例程中可能会遇到的问题,给出相应的解决方案</font><br />
> `<font size="1">`主要记录使用例程中可能会遇到的问题,给出相应的解决方案 `</font><br />`
## 4. 修改历史记录
><font size="1">记录例程的重大修改记录,标明修改发生的版本号 </font><br />
> `<font size="1">`记录例程的重大修改记录,标明修改发生的版本号 `</font><br />`

14
example/peripherals/can/canfd/configs/e2000d_aarch32_demo_canfd.config

@ -143,7 +143,7 @@ CONFIG_USE_CAN=y
# CAN Configuration
#
CONFIG_USE_FCAN=y
CONFIG_FCAN_USE_CANFD=y
# CONFIG_FCAN_USE_CANFD is not set
# end of CAN Configuration
# CONFIG_USE_I2C is not set
@ -169,17 +169,7 @@ CONFIG_FCAN_USE_CANFD=y
# Third-party configuration
#
# CONFIG_USE_LWIP 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_LETTER_SHELL is not set
# CONFIG_USE_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set

14
example/peripherals/can/canfd/configs/e2000d_aarch64_demo_canfd.config

@ -137,7 +137,7 @@ CONFIG_USE_CAN=y
# CAN Configuration
#
CONFIG_USE_FCAN=y
CONFIG_FCAN_USE_CANFD=y
# CONFIG_FCAN_USE_CANFD is not set
# end of CAN Configuration
# CONFIG_USE_I2C is not set
@ -163,17 +163,7 @@ CONFIG_FCAN_USE_CANFD=y
# Third-party configuration
#
# CONFIG_USE_LWIP 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_LETTER_SHELL is not set
# CONFIG_USE_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set

14
example/peripherals/can/canfd/configs/e2000q_aarch32_demo_canfd.config

@ -142,7 +142,7 @@ CONFIG_USE_CAN=y
# CAN Configuration
#
CONFIG_USE_FCAN=y
CONFIG_FCAN_USE_CANFD=y
# CONFIG_FCAN_USE_CANFD is not set
# end of CAN Configuration
# CONFIG_USE_I2C is not set
@ -168,17 +168,7 @@ CONFIG_FCAN_USE_CANFD=y
# Third-party configuration
#
# CONFIG_USE_LWIP 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_LETTER_SHELL is not set
# CONFIG_USE_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set

14
example/peripherals/can/canfd/configs/e2000q_aarch64_demo_canfd.config

@ -136,7 +136,7 @@ CONFIG_USE_CAN=y
# CAN Configuration
#
CONFIG_USE_FCAN=y
CONFIG_FCAN_USE_CANFD=y
# CONFIG_FCAN_USE_CANFD is not set
# end of CAN Configuration
# CONFIG_USE_I2C is not set
@ -162,17 +162,7 @@ CONFIG_FCAN_USE_CANFD=y
# Third-party configuration
#
# CONFIG_USE_LWIP 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_LETTER_SHELL is not set
# CONFIG_USE_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set

BIN
example/peripherals/can/canfd/fig/can_connect.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 850 KiB

BIN
example/peripherals/can/canfd/fig/canfd_filter.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
example/peripherals/can/canfd/fig/canfd_intr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
example/peripherals/can/canfd/fig/canfd_polled.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
example/peripherals/can/canfd/fig/menuconfig.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

19
example/peripherals/can/canfd/inc/canfd_common.h

@ -14,12 +14,13 @@
* FilePath: canfd_common.h
* Date: 2022-02-25 14:53:42
* LastEditTime: 2022-02-28 17:46:03
* Description:  This file is for can common definition
* Description:  This file is for canfd common definition
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/17 first release
* 1.1 huangjin 2023/11/01 add macro definition
*/
#ifndef CAN_COMMON_H
#define CAN_COMMON_H
@ -37,14 +38,16 @@ extern "C"
#define FCAN_TEST_WARN(format, ...) FT_DEBUG_PRINT_W(FCAN_TEST_DEBUG_TAG, format, ##__VA_ARGS__)
#define FCAN_TEST_ERROR(format, ...) FT_DEBUG_PRINT_E(FCAN_TEST_DEBUG_TAG, format, ##__VA_ARGS__)
#define CANFD_TEST_SEND_ID 0x23
#define CANFD_TEST_SEND_LENGTH 16
#define CANFD_LOOPBACK_TEST_TIMES 30
#define CANFD_LOOPBACK_TEST_PERIAD_MS 100
#define CANFD_ID_FILTER_TEST_TIMES 2
#define CAN_TEST_SEND_ID 0x23
#define CAN_TEST_SEND_LENGTH 8
#define CAN_TEST_SEND_STID_LENGTH 8
#define CAN_TEST_SEND_EXID_LENGTH 16
#define CAN_LOOPBACK_TEST_TIMES 30
#define CAN_LOOPBACK_TEST_PERIAD_MS 100
#define CAN_ID_FILTER_TEST_TIMES 2
#define CANFD_TEST_ARB_BAUD_RATE 1000000
#define CANFD_TEST_DATA_BAUD_RATE 2000000
#define CANFD_TEST_ARB_BAUD_RATE 500000
#define CANFD_TEST_DATA_BAUD_RATE 500000
#ifdef __cplusplus
}

2
example/peripherals/can/canfd/inc/canfd_id_filter_example.h

@ -11,7 +11,7 @@
* See the Phytium Public License for more details.
*
*
* FilePath: canfd_intr_loopback_mode_example.h
* FilePath: canfd_id_filter_example.h
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-17 17:46:03
* Description:  This file is for canfd id filter example function definition

52
example/peripherals/can/canfd/inc/canfd_intr_loopback_mode_example.h

@ -0,0 +1,52 @@
/*
* Copyright : (C) 2023 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: canfd_intr_loopback_mode_example.h
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-17 17:46:03
* Description:  This file is for canfd interrupt loopback mode example function definition
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
*/
#ifndef CANFD_INTR_LOOPBACK_MODE_EXAMPLE_H
#define CANFD_INTR_LOOPBACK_MODE_EXAMPLE_H
/***************************** Include Files *********************************/
#include "ftypes.h"
#ifdef __cplusplus
extern "C"
{
#endif
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
/* function for canfd interrupt loopback mode example */
int FCanfdIntrLoopbackExample();
#ifdef __cplusplus
}
#endif
#endif

4
example/peripherals/can/canfd/main.c

@ -19,7 +19,7 @@
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.0 zhangyan 2023/2/17 first release
*/
/***************************** Include Files *********************************/
@ -32,6 +32,7 @@
#include "shell_port.h"
#endif
#include "canfd_intr_loopback_mode_example.h"
#include "canfd_polled_loopback_mode_example.h"
#include "canfd_id_filter_example.h"
@ -55,6 +56,7 @@ int main()
#else
/* if shell command is not enabled, run example one by one */
{
FCanfdIntrLoopbackExample();
FCanfdPolledLoopbackExample();

33
example/peripherals/can/canfd/sdkconfig

@ -41,14 +41,14 @@ CONFIG_FPEN=y
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
CONFIG_TARGET_E2000Q=y
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000Q is not set
CONFIG_TARGET_E2000D=y
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="q"
CONFIG_SOC_CORE_NUM=4
CONFIG_TARGET_TYPE_NAME="d"
CONFIG_SOC_CORE_NUM=2
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
@ -63,21 +63,22 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
#
# Board Configuration
#
CONFIG_E2000D_DEMO_BOARD=y
CONFIG_BOARD_NAME="demo"
#
# IO mux configuration when board start up
#
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_ADC_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_E2000Q_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
@ -136,7 +137,7 @@ CONFIG_USE_CAN=y
# CAN Configuration
#
CONFIG_USE_FCAN=y
CONFIG_FCAN_USE_CANFD=y
# CONFIG_FCAN_USE_CANFD is not set
# end of CAN Configuration
# CONFIG_USE_I2C is not set
@ -162,17 +163,7 @@ CONFIG_FCAN_USE_CANFD=y
# Third-party configuration
#
# CONFIG_USE_LWIP 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_LETTER_SHELL is not set
# CONFIG_USE_AMP is not set
# CONFIG_USE_YMODEM is not set
# CONFIG_USE_SFUD is not set

29
example/peripherals/can/canfd/sdkconfig.h

@ -39,14 +39,14 @@
/* Soc configuration */
/* CONFIG_TARGET_PHYTIUMPI is not set */
#define CONFIG_TARGET_E2000Q
/* CONFIG_TARGET_E2000D is not set */
/* CONFIG_TARGET_E2000Q is not set */
#define CONFIG_TARGET_E2000D
/* CONFIG_TARGET_E2000S is not set */
/* CONFIG_TARGET_FT2004 is not set */
/* CONFIG_TARGET_D2000 is not set */
#define CONFIG_SOC_NAME "e2000"
#define CONFIG_TARGET_TYPE_NAME "q"
#define CONFIG_SOC_CORE_NUM 4
#define CONFIG_TARGET_TYPE_NAME "d"
#define CONFIG_SOC_CORE_NUM 2
#define CONFIG_F32BIT_MEMORY_ADDRESS 0x80000000
#define CONFIG_F32BIT_MEMORY_LENGTH 0x80000000
#define CONFIG_F64BIT_MEMORY_ADDRESS 0x2000000000
@ -60,20 +60,21 @@
/* Board Configuration */
#define CONFIG_E2000D_DEMO_BOARD
#define CONFIG_BOARD_NAME "demo"
/* IO mux configuration when board start up */
/* CONFIG_USE_SPI_IOPAD is not set */
/* CONFIG_USE_GPIO_IOPAD is not set */
/* CONFIG_USE_CAN_IOPAD is not set */
/* CONFIG_USE_QSPI_IOPAD is not set */
/* CONFIG_USE_PWM_IOPAD is not set */
/* CONFIG_USE_ADC_IOPAD is not set */
/* CONFIG_USE_MIO_IOPAD is not set */
/* CONFIG_USE_TACHO_IOPAD is not set */
/* CONFIG_USE_UART_IOPAD is not set */
/* CONFIG_USE_THIRD_PARTY_IOPAD is not set */
#define CONFIG_E2000Q_DEMO_BOARD
/* IO mux configuration when board start up */
/* end of IO mux configuration when board start up */
/* CONFIG_CUS_DEMO_BOARD is not set */
@ -124,7 +125,7 @@
/* CAN Configuration */
#define CONFIG_USE_FCAN
#define CONFIG_FCAN_USE_CANFD
/* CONFIG_FCAN_USE_CANFD is not set */
/* end of CAN Configuration */
/* CONFIG_USE_I2C is not set */
/* CONFIG_USE_TIMER is not set */
@ -148,15 +149,7 @@
/* Third-party configuration */
/* CONFIG_USE_LWIP 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 */
/* CONFIG_USE_LETTER_SHELL is not set */
/* CONFIG_USE_AMP is not set */
/* CONFIG_USE_YMODEM is not set */
/* CONFIG_USE_SFUD is not set */

83
example/peripherals/can/canfd/src/canfd_id_filter_example.c

@ -20,13 +20,13 @@
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.1 huangjin 2023/11/01 improve functions
*/
/***************************** Include Files *********************************/
#include <stdio.h>
#include <string.h>
#include "fcan.h"
#include "fcan_hw.h"
#include "fparameters.h"
#include "fsleep.h"
@ -35,13 +35,11 @@
#include "canfd_common.h"
#include "canfd_id_filter_example.h"
#include "fio_mux.h"
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#warning "Please include sdkconfig.h"
#endif
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
@ -66,6 +64,8 @@ int FCanfdIdFilterExample()
int filter_flag = 0;
int send_times = 0;
int i = 0;
printf("Use canfd protocol!\n");
/*init iomux*/
FIOMuxInit();
for (can_id = FCAN0_ID; can_id < FCAN_NUM ; can_id++)
@ -83,7 +83,7 @@ int FCanfdIdFilterExample()
/*set to normal mode*/
FCanSetMode(&can[can_id], FCAN_PROBE_NORMAL_MODE);
}
/*Baud rate is configured as 1M/S + 5M/S*/
/*Baud rate is configured as 500K*/
FCanBaudrateConfig arb_segment_config;
FCanBaudrateConfig data_segment_config;
memset(&arb_segment_config, 0, sizeof(arb_segment_config));
@ -112,15 +112,28 @@ int FCanfdIdFilterExample()
FCAN_TEST_ERROR("Can%d set data segment baudrate error.", can_id);
return FCAN_FAILURE;
}
}
/* 首先测试标准帧,再测试扩展帧 */
u8 ide_flag = 0;
for(ide_flag = 0 ; ide_flag < 2; ide_flag++)
{
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* set filter,and configured canfd to receive only ID 0x02 frame*/
FCanIdMaskConfig id_mask;
FCanEnable(&can[can_id], FALSE);
memset(&id_mask, 0, sizeof(id_mask));
for (int i = 0; i < FCAN_ACC_ID_REG_NUM; i++)
{
id_mask.filter_index = i;
/* 只接收发送id=0x02的帧 */
id_mask.id = 0x02;
id_mask.mask = 0;
if ( ide_flag == 1 )
{
id_mask.type = EXTEND_FRAME;
}
ret |= FCanIdMaskFilterSet(&can[can_id], &id_mask);
}
if (ret != FCAN_SUCCESS)
@ -128,20 +141,28 @@ int FCanfdIdFilterExample()
FCAN_TEST_ERROR("Can%d set mask filter error", can_id);
return FCAN_FAILURE;
}
/*Identifier mask enable*/
/* Identifier mask enable */
FCanIdMaskFilterEnable(&can[can_id]);
/*can enable*/
FCanEnable(&can[can_id], TRUE);
}
for (send_times = 0; send_times < CANFD_ID_FILTER_TEST_TIMES; send_times++)
for (send_times = 0; send_times < CAN_ID_FILTER_TEST_TIMES; send_times++)
{
memset(&send_frame, 0, sizeof(FCanFrame));
/*set the canid = 0x02 first time ,and set the canid = 0x01 second time */
send_frame.canid = (send_times == 0)? 0x02:0x01;
send_frame.canid &= CAN_EFF_MASK;
send_frame.candlc = CANFD_TEST_SEND_LENGTH;
send_frame.candlc = CAN_TEST_SEND_EXID_LENGTH;
if (ide_flag == 0)
{
send_frame.canid &= CAN_SFF_MASK;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
for (i = 0; i < send_frame.candlc; i++)
{
send_frame.data[i] = i + 0x01 ;
@ -154,18 +175,22 @@ int FCanfdIdFilterExample()
printf("Can%d send %d times error.", FCAN0_ID, send_times);
return FCAN_FAILURE;
}
fsleep_millisec(CANFD_LOOPBACK_TEST_PERIAD_MS);
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
memset(&recv_frame, 0, sizeof(FCanFrame));
instance_p = &can[FCAN1_ID];
ret = FCanRecv(instance_p, &recv_frame);
if (ret == FT_SUCCESS)
{
for (i = 0; i < CANFD_TEST_SEND_LENGTH; i++)
for (i = 0; i < send_frame.candlc; i++)
{
if (recv_frame.data[i] != send_frame.data[i])
{
filter_flag = 1;
}
else
{
filter_flag = 0;
}
}
}
else
@ -174,22 +199,46 @@ int FCanfdIdFilterExample()
return FCAN_FAILURE;
}
if ( filter_flag == 1)
if (filter_flag == 1)
{
if (ide_flag == 0)
{
if (send_frame.canid == 0x01)
{
printf("The standard frame id 0x%02x was filtered successfully.\n", send_frame.canid);
}
else
{
FCAN_TEST_ERROR("Test failed, the standard frame id 0x%02x should not be filtered!\n",send_frame.canid);
ret = FCAN_FAILURE;
break;
}
}
else
{
if (send_frame.canid == 1)
if (send_frame.canid == 0x80000001)
{
printf("The frame id %x was filtered successfully.\n", send_frame.canid);
printf("The extern frame id 0x%02x was filtered successfully.\n", send_frame.canid);
}
else
{
FCAN_TEST_ERROR("Test failed, the frame id %x should not be filtered!\n",send_frame.canid);
FCAN_TEST_ERROR("Test failed, the extern frame id 0x%02x should not be filtered!\n",send_frame.canid);
ret = FCAN_FAILURE;
break;
}
}
}
else
{
if (ide_flag == 0)
{
printf("The standard frame id 0x%02x was receved successfully.\n", send_frame.canid);
}
else
{
printf("The frame id %x was receved successfully.\n", send_frame.canid);
printf("The extern frame id 0x%02x was receved successfully.\n", send_frame.canid);
}
}
}
}
@ -208,7 +257,7 @@ int FCanfdIdFilterExample()
}
else
{
printf("%s@%d: canfd id filter example example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
printf("%s@%d: canfd id filter example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
return FCAN_FAILURE;
}

429
example/peripherals/can/canfd/src/canfd_intr_loopback_mode_example.c

@ -0,0 +1,429 @@
/*
* Copyright : (C) 2023 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: canfd_intr_loopback_mode_example.c
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-17 17:46:03
* Description:  This file is for canfd interrupt loopback mode example function implmentation
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.1 huangjin 2023/11/01 improve functions
*/
/***************************** Include Files *********************************/
#include <stdio.h>
#include <string.h>
#include "fcan.h"
#include "fcan_hw.h"
#include "finterrupt.h"
#include "fcpu_info.h"
#include "fparameters.h"
#include "fsleep.h"
#include "fassert.h"
#include "ftypes.h"
#include "canfd_common.h"
#include "canfd_intr_loopback_mode_example.h"
#include "fio_mux.h"
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#warning "Please include sdkconfig.h"
#endif
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/************************** Variable Definitions *****************************/
/* variables used in example */
static FCanCtrl can[FCAN_NUM];
static FCanFrame send_frame;
static u16 can0_recv_irq_flag = 0;
static u16 can1_recv_irq_flag = 0;
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
/************************** Function *****************************************/
/*Configuring interrupt service functions*/
static void FCanTxIrqCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can%d irq send frame is ok.", instance_p->config.instance_id);
}
static void FCanRxIrqCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can%d irq recv frame callback", instance_p->config.instance_id);
FCanFrame recv_frame;
u8 i;
u32 status = 0;
static u16 can0_recv_times = 0;
static u16 can1_recv_times = 0;
if (instance_p->config.instance_id == FCAN0_ID)
{
memset(&recv_frame, 0, sizeof(FCanFrame));
status = FCanRecv(instance_p, &recv_frame);
if ((status == FT_SUCCESS) && (send_frame.candlc == recv_frame.candlc))
{
FCAN_TEST_DEBUG("can 0 recv id is %#x\r\n", recv_frame.canid);
FCAN_TEST_DEBUG("can 0 recv dlc is %d\r\n", recv_frame.candlc);
FCAN_TEST_DEBUG("can 0 recv data is ");
for (i = 0; i < recv_frame.candlc; i++)
{
FCAN_TEST_DEBUG("%#x ", recv_frame.data[i]);
if (recv_frame.data[i] != send_frame.data[i])
{
FCAN_TEST_ERROR("\nCan 0 recv is not equal to can 1 send,can0_recv_times= %d\r\n", can0_recv_times);
return;
}
}
}
else
{
FCAN_TEST_ERROR("Can 0 recv failed\n");
return;
}
can0_recv_times++;
if (can0_recv_times == CAN_LOOPBACK_TEST_TIMES)
{
if((recv_frame.canid & CAN_EFF_FLAG) == 0)
printf("Can 0 recv is equal to can 1 send, use standard frame, can0_recv_times=%d.\n", can0_recv_times);
else
printf("Can 0 recv is equal to can 1 send, use extern frame, can0_recv_times=%d.\n", can0_recv_times);
can0_recv_irq_flag = 1;
can0_recv_times = 0;
}
}
else if (instance_p->config.instance_id == FCAN1_ID)
{
memset(&recv_frame, 0, sizeof(FCanFrame));
status = FCanRecv(instance_p, &recv_frame);
if ((status == FT_SUCCESS) && (send_frame.candlc == recv_frame.candlc))
{
FCAN_TEST_DEBUG("Can 1 recv id is %#x\r\n", recv_frame.canid);
FCAN_TEST_DEBUG("Can 1 recv dlc is %d\r\n", recv_frame.candlc);
FCAN_TEST_DEBUG("Can 1 recv data is ");
for (i = 0; i < recv_frame.candlc; i++)
{
FCAN_TEST_DEBUG("%#x ", recv_frame.data[i]);
if (recv_frame.data[i] != send_frame.data[i])
{
FCAN_TEST_ERROR("Can 1 recv is not equal to can 0 send.\r\n");
return;
}
}
}
else
{
FCAN_TEST_ERROR("Can 1 recv failed\n");
return;
}
can1_recv_times++;
if (can1_recv_times == CAN_LOOPBACK_TEST_TIMES)
{
if((recv_frame.canid & CAN_EFF_FLAG) == 0)
printf("Can 1 recv is equal to can 0 send, use standard frame, can1_recv_times=%d.\n", can1_recv_times);
else
printf("Can 1 recv is equal to can 0 send, use extern frame, can1_recv_times=%d.\n", can1_recv_times);
can1_recv_irq_flag = 1;
can1_recv_times = 0;
}
}
}
static void FCanErrorCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
uintptr base_addr = instance_p->config.base_address;
FCAN_TEST_DEBUG("Can %d is under error", instance_p->config.instance_id);
FCAN_TEST_DEBUG("error_status is %x", FCAN_READ_REG32(base_addr, FCAN_INTR_OFFSET));
FCAN_TEST_DEBUG("rxerr_cnt is %x", FCAN_ERR_CNT_RFN_GET(FCAN_READ_REG32(base_addr, FCAN_ERR_CNT_OFFSET)));
FCAN_TEST_DEBUG("txerr_cnt is %x", FCAN_ERR_CNT_TFN_GET(FCAN_READ_REG32(base_addr, FCAN_ERR_CNT_OFFSET)));
}
static void FCanBusoffCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can %d bus off", instance_p->config.instance_id);
}
static void FCanPerrorCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can %d passion error callback", instance_p->config.instance_id);
}
static void FCanPwarnCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can %d passion warn callback", instance_p->config.instance_id);
}
static void FCanRxFifoFullCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can %d rx_fifo full callback", instance_p->config.instance_id);
}
static void FCanTxFifoEmptyCallback(void *args)
{
FCanCtrl *instance_p = (FCanCtrl *)args;
FCAN_TEST_DEBUG("Can %d tx_fifo empty callback", instance_p->config.instance_id);
}
static void FCanIrqSet(FCanCtrl *instance_p)
{
u32 cpu_id;
GetCpuId(&cpu_id);
InterruptSetTargetCpus(instance_p->config.irq_num, cpu_id);
/* Enable interrupts, tx over, rx over, error, bus off, passive error, passive warning, rx fifo full, tx fifo empty*/
FCanIntrEventConfig intr_event;
memset(&intr_event, 0, sizeof(intr_event));
intr_event.type = FCAN_INTR_EVENT_SEND;
intr_event.handler = FCanTxIrqCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_RECV;
intr_event.handler = FCanRxIrqCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_ERROR;
intr_event.handler = FCanErrorCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_BUSOFF;
intr_event.handler = FCanBusoffCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_PERROE;
intr_event.handler = FCanPerrorCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_PWARN;
intr_event.handler = FCanPwarnCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_FIFOFULL;
intr_event.handler = FCanRxFifoFullCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
intr_event.type = FCAN_INTR_EVENT_FIFOEMPTY;
intr_event.handler = FCanTxFifoEmptyCallback;
intr_event.param = (void *)instance_p;
FCanRegisterInterruptHandler(instance_p, &intr_event);
FCanInterruptEnable(instance_p, intr_event.type);
InterruptSetPriority(instance_p->config.irq_num, 0);
InterruptInstall(instance_p->config.irq_num, FCanIntrHandler, instance_p, "canfd");
InterruptUmask(instance_p->config.irq_num);
}
int FCanfdIntrLoopbackExample()
{
FError ret = FCAN_SUCCESS;
u32 can_id = FCAN0_ID;
FCanCtrl *instance_p;
int send_times = 0;
int i = 0;
printf("Use canfd protocol!\n");
/*init iomux*/
FIOMuxInit();
for (can_id = FCAN0_ID; can_id < FCAN_NUM ; can_id++)
{
FIOPadSetCanMux(can_id);
ret = FCanCfgInitialize(&can[can_id], FCanLookupConfig(can_id));
/*Exit with message if can-id is un-usable in target board */
if (ret != FCAN_SUCCESS)
{
FCAN_TEST_DEBUG("Can%d Initialize error.", can_id);
return FCAN_FAILURE;
}
/*enable canfd*/
FCanFdEnable(&can[can_id], TRUE);
/*set to normal mode*/
FCanSetMode(&can[can_id], FCAN_PROBE_NORMAL_MODE);
}
/*Baud rate is configured as 1M*/
FCanBaudrateConfig arb_segment_config;
FCanBaudrateConfig data_segment_config;
memset(&arb_segment_config, 0, sizeof(arb_segment_config));
memset(&data_segment_config, 0, sizeof(data_segment_config));
arb_segment_config.baudrate = CANFD_TEST_ARB_BAUD_RATE;
arb_segment_config.auto_calc = TRUE;
arb_segment_config.segment = FCAN_ARB_SEGMENT;
data_segment_config.baudrate = CANFD_TEST_DATA_BAUD_RATE;
data_segment_config.auto_calc = TRUE;
data_segment_config.segment = FCAN_DATA_SEGMENT;
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
ret = FCanBaudrateSet(&can[can_id], &arb_segment_config);
if (ret != FCAN_SUCCESS)
{
FCAN_TEST_ERROR("Can%d set arb segment baudrate error.", can_id);
return FCAN_FAILURE;
}
ret = FCanBaudrateSet(&can[can_id], &data_segment_config);
if (ret != FCAN_SUCCESS)
{
FCAN_TEST_ERROR("Can%d set data segment baudrate error.", can_id);
return FCAN_FAILURE;
}
}
/* 首先测试标准帧,再测试扩展帧 */
u8 ide_flag = 0;
for(ide_flag = 0 ; ide_flag < 2; ide_flag++)
{
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* set filter */
FCanIdMaskConfig id_mask;
FCanEnable(&can[can_id], FALSE);
memset(&id_mask, 0, sizeof(id_mask));
for (int i = 0; i < FCAN_ACC_ID_REG_NUM; i++)
{
id_mask.filter_index = i;
id_mask.id = 0;
id_mask.mask = FCAN_ACC_IDN_MASK;
if ( ide_flag == 1 )
{
id_mask.type = EXTEND_FRAME;
}
ret |= FCanIdMaskFilterSet(&can[can_id], &id_mask);
}
if (ret != FCAN_SUCCESS)
{
FCAN_TEST_ERROR("Can%d set mask filter error", can_id);
return FCAN_FAILURE;
}
/* Identifier mask enable */
FCanIdMaskFilterEnable(&can[can_id]);
/* init interrupt */
FCanIrqSet(&can[can_id]);
/*can enable*/
FCanEnable(&can[can_id], TRUE);
}
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
memset(&send_frame, 0, sizeof(FCanFrame));
send_frame.canid = CAN_TEST_SEND_ID;
send_frame.candlc = CAN_TEST_SEND_EXID_LENGTH;
if (ide_flag == 0)
{
send_frame.canid &= CAN_SFF_MASK;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
/* can 0 send, can 1 receive */
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
for (i = 0; i < send_frame.candlc; i++)
{
send_frame.data[i] = i + send_times;
}
instance_p = &can[FCAN0_ID];
ret = FCanSend(instance_p, &send_frame);
if (ret != 0)
{
FCAN_TEST_ERROR("Can%d send %d times error.", FCAN0_ID, send_times);
return FCAN_FAILURE;
}
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
}
memset(&send_frame, 0, sizeof(FCanFrame));
send_frame.canid = CAN_TEST_SEND_ID;
send_frame.candlc = CAN_TEST_SEND_EXID_LENGTH;
if (ide_flag == FALSE)
{
send_frame.canid &= CAN_SFF_MASK;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
for (i = 0; i < send_frame.candlc; i++)
{
send_frame.data[i] = i + send_times;
}
instance_p = &can[FCAN1_ID];
ret = FCanSend(instance_p, &send_frame);
if (ret != 0)
{
FCAN_TEST_ERROR("Can%d send %d times error.", FCAN1_ID, send_times);
return FCAN_FAILURE;
}
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
}
}
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* interrupt deinit */
InterruptMask(can[can_id].config.irq_num);
/* can deinit */
FCanDeInitialize(&can[can_id]);
}
FIOMuxDeInit();/*init iomux */
/* print message on example run result */
if (ret == FT_SUCCESS && can0_recv_irq_flag == 1 && can1_recv_irq_flag == 1)
{
printf("%s@%d: can interrupt loopback mode example success !!! \r\n", __func__, __LINE__);
}
else
{
printf("%s@%d: can interrupt loopback mode example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
return FCAN_FAILURE;
}
return ret;
}

65
example/peripherals/can/canfd/src/canfd_polled_loopback_mode_example.c

@ -20,13 +20,14 @@
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/2/24 first release
* 1.1 huangjin 2023/11/01 improve functions
*/
/***************************** Include Files *********************************/
#include <stdio.h>
#include <string.h>
#include "fcan.h"
#include "fio_mux.h"
#include "fcan_hw.h"
#include "fparameters.h"
#include "fsleep.h"
@ -34,8 +35,6 @@
#include "ftypes.h"
#include "canfd_common.h"
#include "canfd_polled_loopback_mode_example.h"
#include "fio_mux.h"
#include "sdkconfig.h"
#ifndef SDK_CONFIG_H__
#warning "Please include sdkconfig.h"
@ -63,6 +62,8 @@ int FCanfdPolledLoopbackExample()
FCanCtrl *instance_p;
int send_times = 0;
int i = 0;
printf("Use canfd protocol!\n");
/*init iomux*/
FIOMuxInit();
for (can_id = FCAN0_ID; can_id < FCAN_NUM ; can_id++)
@ -80,7 +81,7 @@ int FCanfdPolledLoopbackExample()
/*set to normal mode*/
FCanSetMode(&can[can_id], FCAN_PROBE_NORMAL_MODE);
}
/*Baud rate is configured as 1M/S+5M/S*/
/*Baud rate is configured as 1M*/
FCanBaudrateConfig arb_segment_config;
FCanBaudrateConfig data_segment_config;
memset(&arb_segment_config, 0, sizeof(arb_segment_config));
@ -108,14 +109,26 @@ int FCanfdPolledLoopbackExample()
FCAN_TEST_ERROR("Canfd%d set data segment baudrate error.", can_id);
return FCAN_FAILURE;
}
}
/* 首先测试标准帧,再测试扩展帧 */
u8 ide_flag = 0;
for(ide_flag = 0 ; ide_flag < 2; ide_flag++)
{
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/* set filter */
FCanIdMaskConfig id_mask;
FCanEnable(&can[can_id], FALSE);
memset(&id_mask, 0, sizeof(id_mask));
for (int i = 0; i < FCAN_ACC_ID_REG_NUM; i++)
{
id_mask.filter_index = i;
id_mask.id = 0;
id_mask.mask = FCAN_ACC_IDN_MASK;
if ( ide_flag == 1 )
{
id_mask.type = EXTEND_FRAME;
}
ret |= FCanIdMaskFilterSet(&can[can_id], &id_mask);
}
if (ret != FCAN_SUCCESS)
@ -130,11 +143,19 @@ int FCanfdPolledLoopbackExample()
}
memset(&send_frame, 0, sizeof(FCanFrame));
send_frame.canid = CANFD_TEST_SEND_ID+0X77;
send_frame.canid &= CAN_EFF_MASK;
send_frame.candlc = CANFD_TEST_SEND_LENGTH;
send_frame.canid = CAN_TEST_SEND_ID;
send_frame.candlc = CAN_TEST_SEND_EXID_LENGTH;
if (ide_flag == 0)
{
send_frame.canid &= CAN_SFF_MASK;
}
else
{
send_frame.canid |= CAN_EFF_FLAG;
}
/* can 0 send, can 1 receive */
for (send_times = 0; send_times < CANFD_LOOPBACK_TEST_TIMES; send_times++)
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
for (i = 0; i < send_frame.candlc; i++)
{
@ -147,16 +168,16 @@ int FCanfdPolledLoopbackExample()
FCAN_TEST_ERROR("Can%d send %d times error.", FCAN0_ID, send_times);
return FCAN_FAILURE;
}
fsleep_millisec(CANFD_LOOPBACK_TEST_PERIAD_MS);
fsleep_millisec(CAN_LOOPBACK_TEST_PERIAD_MS);
instance_p = &can[FCAN1_ID];
ret = FCanRecv(instance_p, &recv_frame);
if ((ret == FT_SUCCESS) && (send_frame.candlc == recv_frame.candlc))
{
for (i = 0; i < recv_frame.candlc; i++)
for (i = 0; i < send_frame.candlc; i++)
{
if (recv_frame.data[i] != send_frame.data[i])
{
FCAN_TEST_ERROR("\n Can 1 recv is not equal to can 0 send,times= %d\r\n", send_times);
FCAN_TEST_ERROR("\n Can 1 recv is not equal to can 0 send,times= %d.\r\n", send_times);
return FCAN_FAILURE;
}
}
@ -167,9 +188,12 @@ int FCanfdPolledLoopbackExample()
return FCAN_FAILURE;
}
}
printf("Can 1 recv is equal to can 0 send\n");
if(ide_flag == 0)
printf("Can 1 recv is equal to can 0 send, use standard frame.\n");
else
printf("Can 1 recv is equal to can 0 send, use extern frame.\n");
/* can 1 send, can 0 receive */
for (send_times = 0; send_times < CANFD_LOOPBACK_TEST_TIMES; send_times++)
for (send_times = 0; send_times < CAN_LOOPBACK_TEST_TIMES; send_times++)
{
for (i = 0; i < send_frame.candlc; i++)
{
@ -182,7 +206,7 @@ int FCanfdPolledLoopbackExample()
FCAN_TEST_ERROR("Can%d send %d times error.", FCAN1_ID, send_times);
return FCAN_FAILURE;
}
fsleep_millisec(CANFD_LOOPBACK_TEST_TIMES);
fsleep_millisec(CAN_LOOPBACK_TEST_TIMES);
instance_p = &can[FCAN0_ID];
ret = FCanRecv(instance_p, &recv_frame);
if ((ret == FT_SUCCESS) && (send_frame.candlc == recv_frame.candlc))
@ -202,21 +226,28 @@ int FCanfdPolledLoopbackExample()
return FCAN_FAILURE;
}
}
printf("Can 0 recv is equal to can 1 send\n");
if(ide_flag == 0)
printf("Can 0 recv is equal to can 1 send, use standard frame.\n");
else
printf("Can 0 recv is equal to can 1 send, use extern frame.\n");
}
for (can_id = FCAN0_ID; can_id < FCAN_NUM; can_id++)
{
/*can deinit */
FCanDeInitialize(&can[can_id]);
}
FIOMuxDeInit();/*init iomux */
/* print message on example run result */
if (ret == FT_SUCCESS)
{
printf("%s@%d: canfd polled loopback mode example success !!! \r\n", __func__, __LINE__);
printf("%s@%d: can polled loopback mode example success !!! \r\n", __func__, __LINE__);
}
else
{
printf("%s@%d: canfd polled loopback mode example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
printf("%s@%d: can polled loopback mode example failed !!!, ret = %d \r\n", __func__, __LINE__, ret);
return FCAN_FAILURE;
}

20
example/peripherals/can/canfd/src/cmd_canfd.c

@ -14,7 +14,7 @@
* FilePath: cmd_canfd.c
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-17 17:46:03
* Description:  This file is for canfd cmd catalogue
* Description:  This file is for can cmd catalogue
*
* Modify History:
* Ver   Who        Date         Changes
@ -34,6 +34,7 @@
#include "shell.h"
#include "strto.h"
#include "canfd_intr_loopback_mode_example.h"
#include "canfd_polled_loopback_mode_example.h"
#include "canfd_id_filter_example.h"
@ -41,16 +42,21 @@
static void FCanfdExampleUsage(void)
{
printf("Usage:\r\n");
printf("canfd intr \r\n");
printf("-- run canfd interrupt loopback mode example at controller \r\n");
printf("canfd polled \r\n");
printf("-- run canfd polled loopback mode example at controller\r\n");
printf("canfd filter_fd \r\n");
#if defined(CONFIG_TARGET_E2000)
printf("canfd filter \r\n");
printf("-- run canfd id filter example at controller\r\n");
#endif
}
/* entry function for canfd example */
static int FCanfdExampleEntry(int argc, char *argv[])
{
int ret = 0;
u32 id = 0U;
/* check input args of example, exit if invaild */
if (argc < 2)
@ -59,19 +65,27 @@ static int FCanfdExampleEntry(int argc, char *argv[])
return -1;
}
/* parser example input args and run example */
if (!strcmp(argv[1], "intr"))
{
ret = FCanfdIntrLoopbackExample();
}
if (!strcmp(argv[1], "polled"))
{
ret = FCanfdPolledLoopbackExample();
}
#if defined(CONFIG_TARGET_E2000)
if (!strcmp(argv[1], "filter"))
{
ret = FCanfdIdFilterExample();
}
#endif
return ret;
}
/* register command for xxx example */
/* register command for canfd example */
SHELL_EXPORT_CMD(SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), canfd, FCanfdExampleEntry, canfd example);
#endif

1
example/peripherals/sd/makefile

@ -24,3 +24,4 @@ image:
make clean
make all -j
cp ./$(IMAGE_OUT_NAME).elf $(USR_BOOT_DIR)/baremetal.elf
cp ./$(IMAGE_OUT_NAME).bin $(USR_BOOT_DIR)/baremetal.bin

6
example/peripherals/sd/src/sdif/sdif_sdio_detect_example.c

@ -114,11 +114,10 @@ int FSdifSdioCardDetectExample(void)
int ret = 0;
status_t err = 0;
FSdifTimingInit();
#ifndef CONFIG_TARGET_PHYTIUMPI /* phytium pi embedded rtl8821cs sdio instead */
FSdifSdioMW8801PowerUp();
#endif
FSdifTimingInit();
SDMMC_OSAInit();
memset(&s_inst_config, 0, sizeof(s_inst_config));
@ -137,8 +136,6 @@ int FSdifSdioCardDetectExample(void)
s_inst_config.isUHSCard = FALSE;
s_inst_config.sdioCardInt = FSdifSdioCardIntCallback;
s_inst_config.sdioCardIntArg = NULL;
/*init iomux*/
FIOMuxInit();
/* set SDIO interrupt pin mux */
FIOPadSetSdMux(s_inst_config.hostId);
@ -162,7 +159,6 @@ err_exit:
SDIO_Deinit(&s_inst.card);
SDMMC_OSADeInit();
FSdifTimingDeinit();
FIOMuxDeInit();
return err;
}

62
example/peripherals/serial/sdkconfig

@ -9,8 +9,8 @@ CONFIG_ARCH_NAME="armv8"
#
# Arm architecture configuration
#
CONFIG_ARCH_ARMV8_AARCH64=y
# CONFIG_ARCH_ARMV8_AARCH32 is not set
# CONFIG_ARCH_ARMV8_AARCH64 is not set
CONFIG_ARCH_ARMV8_AARCH32=y
#
# Compiler configuration
@ -18,21 +18,27 @@ CONFIG_ARCH_ARMV8_AARCH64=y
CONFIG_ARM_GCC_SELECT=y
# CONFIG_ARM_CLANG_SELECT is not set
CONFIG_TOOLCHAIN_NAME="gcc"
CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_ARCH_EXECUTION_STATE="aarch64"
CONFIG_ARM_NEON=y
CONFIG_ARM_CRC=y
CONFIG_ARM_CRYPTO=y
CONFIG_ARM_FLOAT_POINT=y
# CONFIG_GCC_CODE_MODEL_TINY is not set
CONFIG_GCC_CODE_MODEL_SMALL=y
# CONFIG_GCC_CODE_MODEL_LARGE is not set
CONFIG_TARGET_ARMV8_AARCH32=y
CONFIG_ARCH_EXECUTION_STATE="aarch32"
#
# Fpu configuration
#
CONFIG_CRYPTO_NEON_FP_ARMV8=y
# CONFIG_VFPV4 is not set
# CONFIG_VFPV4_D16 is not set
# CONFIG_VFPV3 is not set
# CONFIG_VFPV3_D16 is not set
CONFIG_ARM_MFPU="crypto-neon-fp-armv8"
CONFIG_MFLOAT_ABI_HARD=y
# CONFIG_MFLOAT_ABI_SOFTFP is not set
CONFIG_ARM_MFLOAT_ABI="hard"
# end of Fpu configuration
# end of Compiler configuration
CONFIG_USE_CACHE=y
CONFIG_USE_MMU=y
CONFIG_BOOT_WITH_FLUSH_CACHE=y
# CONFIG_MMU_DEBUG_PRINTS is not set
CONFIG_USE_AARCH64_L1_TO_AARCH32=y
CONFIG_FPEN=y
# end of Arm architecture configuration
# end of Arch configuration
@ -40,14 +46,15 @@ CONFIG_FPEN=y
#
# Soc configuration
#
CONFIG_TARGET_PHYTIUMPI=y
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
CONFIG_TARGET_E2000D=y
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="phytiumpi"
CONFIG_SOC_CORE_NUM=4
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="d"
CONFIG_SOC_CORE_NUM=2
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
@ -62,21 +69,22 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
#
# Board Configuration
#
CONFIG_BOARD_NAME="firefly"
CONFIG_E2000D_DEMO_BOARD=y
CONFIG_BOARD_NAME="demo"
#
# IO mux configuration when board start up
#
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_ADC_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_FIREFLY_DEMO_BOARD=y
#
# IO mux configuration when board start up
#
# end of IO mux configuration when board start up
# CONFIG_CUS_DEMO_BOARD is not set
@ -237,7 +245,11 @@ CONFIG_DEFAULT_LINKER_SCRIPT=y
CONFIG_IMAGE_LOAD_ADDRESS=0x80100000
CONFIG_IMAGE_MAX_LENGTH=0x1000000
CONFIG_HEAP_SIZE=2
CONFIG_STACK_SIZE=0x400
CONFIG_FPU_STACK_SIZE=0x1000
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
# end of Build setup

59
example/peripherals/serial/sdkconfig.h

@ -10,42 +10,48 @@
/* Arm architecture configuration */
#define CONFIG_ARCH_ARMV8_AARCH64
/* CONFIG_ARCH_ARMV8_AARCH32 is not set */
/* CONFIG_ARCH_ARMV8_AARCH64 is not set */
#define CONFIG_ARCH_ARMV8_AARCH32
/* Compiler configuration */
#define CONFIG_ARM_GCC_SELECT
/* CONFIG_ARM_CLANG_SELECT is not set */
#define CONFIG_TOOLCHAIN_NAME "gcc"
#define CONFIG_TARGET_ARMV8_AARCH64
#define CONFIG_ARCH_EXECUTION_STATE "aarch64"
#define CONFIG_ARM_NEON
#define CONFIG_ARM_CRC
#define CONFIG_ARM_CRYPTO
#define CONFIG_ARM_FLOAT_POINT
/* CONFIG_GCC_CODE_MODEL_TINY is not set */
#define CONFIG_GCC_CODE_MODEL_SMALL
/* CONFIG_GCC_CODE_MODEL_LARGE is not set */
#define CONFIG_TARGET_ARMV8_AARCH32
#define CONFIG_ARCH_EXECUTION_STATE "aarch32"
/* Fpu configuration */
#define CONFIG_CRYPTO_NEON_FP_ARMV8
/* CONFIG_VFPV4 is not set */
/* CONFIG_VFPV4_D16 is not set */
/* CONFIG_VFPV3 is not set */
/* CONFIG_VFPV3_D16 is not set */
#define CONFIG_ARM_MFPU "crypto-neon-fp-armv8"
#define CONFIG_MFLOAT_ABI_HARD
/* CONFIG_MFLOAT_ABI_SOFTFP is not set */
#define CONFIG_ARM_MFLOAT_ABI "hard"
/* end of Fpu configuration */
/* end of Compiler configuration */
#define CONFIG_USE_CACHE
#define CONFIG_USE_MMU
#define CONFIG_BOOT_WITH_FLUSH_CACHE
/* CONFIG_MMU_DEBUG_PRINTS is not set */
#define CONFIG_USE_AARCH64_L1_TO_AARCH32
#define CONFIG_FPEN
/* end of Arm architecture configuration */
/* end of Arch configuration */
/* Soc configuration */
#define CONFIG_TARGET_PHYTIUMPI
/* CONFIG_TARGET_PHYTIUMPI is not set */
/* CONFIG_TARGET_E2000Q is not set */
/* CONFIG_TARGET_E2000D is not set */
#define CONFIG_TARGET_E2000D
/* CONFIG_TARGET_E2000S is not set */
/* CONFIG_TARGET_FT2004 is not set */
/* CONFIG_TARGET_D2000 is not set */
#define CONFIG_SOC_NAME "phytiumpi"
#define CONFIG_SOC_CORE_NUM 4
#define CONFIG_SOC_NAME "e2000"
#define CONFIG_TARGET_TYPE_NAME "d"
#define CONFIG_SOC_CORE_NUM 2
#define CONFIG_F32BIT_MEMORY_ADDRESS 0x80000000
#define CONFIG_F32BIT_MEMORY_LENGTH 0x80000000
#define CONFIG_F64BIT_MEMORY_ADDRESS 0x2000000000
@ -59,20 +65,21 @@
/* Board Configuration */
#define CONFIG_BOARD_NAME "firefly"
#define CONFIG_E2000D_DEMO_BOARD
#define CONFIG_BOARD_NAME "demo"
/* IO mux configuration when board start up */
/* CONFIG_USE_SPI_IOPAD is not set */
/* CONFIG_USE_GPIO_IOPAD is not set */
/* CONFIG_USE_CAN_IOPAD is not set */
/* CONFIG_USE_QSPI_IOPAD is not set */
/* CONFIG_USE_PWM_IOPAD is not set */
/* CONFIG_USE_ADC_IOPAD is not set */
/* CONFIG_USE_MIO_IOPAD is not set */
/* CONFIG_USE_TACHO_IOPAD is not set */
/* CONFIG_USE_UART_IOPAD is not set */
/* CONFIG_USE_THIRD_PARTY_IOPAD is not set */
#define CONFIG_FIREFLY_DEMO_BOARD
/* IO mux configuration when board start up */
/* end of IO mux configuration when board start up */
/* CONFIG_CUS_DEMO_BOARD is not set */
@ -215,8 +222,12 @@
#define CONFIG_IMAGE_LOAD_ADDRESS 0x80100000
#define CONFIG_IMAGE_MAX_LENGTH 0x1000000
#define CONFIG_HEAP_SIZE 2
#define CONFIG_STACK_SIZE 0x400
#define CONFIG_FPU_STACK_SIZE 0x1000
#define CONFIG_SVC_STACK_SIZE 0x1000
#define CONFIG_SYS_STACK_SIZE 0x1000
#define CONFIG_IRQ_STACK_SIZE 0x1000
#define CONFIG_ABORT_STACK_SIZE 0x1000
#define CONFIG_FIQ_STACK_SIZE 0x1000
#define CONFIG_UNDEF_STACK_SIZE 0x1000
/* end of Linker Options */
/* end of Build setup */

1
soc/common/fcpu_info.c

@ -24,7 +24,6 @@
#include "fcpu_info.h"
#include "ferror_code.h"
#include "fparameters.h"
#include "fprintk.h"
extern u32 GetAffinity(void);

109
soc/d2000/fparameters.c → soc/d2000/fcpu_affinity_mask.c

@ -11,114 +11,18 @@
* See the Phytium Public License for more details.
*
*
* FilePath: parameters.c
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-17 17:58:45
* FilePath: fcpu_affinity_mask.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fmmu.h"
#include "ftypes.h"
#include "sdkconfig.h"
#include "fparameters.h"
#ifdef CONFIG_TARGET_ARMV8_AARCH64
static const struct ArmMmuRegion mmu_ranges[] =
{
MMU_REGION_FLAT_ENTRY("DEVICE_REGION",
0x00, 0x40000000,
MT_DEVICE_NGNRE | MT_P_RW_U_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_CONFIG_REGION",
0x40000000, 0x10000000,
MT_DEVICE_NGNRNE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x50000000, 0x30000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_2G_REGION",
0x80000000, 0x80000000,
MT_NORMAL | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x1000000000, 0x1000000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_EXTEND_REGION",
0x2000000000, 0x2000000000,
MT_NORMAL | MT_RW | MT_NS),
};
const uint32_t mmu_regions_size = ARRAY_SIZE(mmu_ranges);
const struct ArmMmuConfig mmu_config =
{
.num_regions = mmu_regions_size,
.mmu_regions = mmu_ranges,
};
#else
#define DDR_MEM NORMAL_MEM
struct mem_desc platform_mem_desc[] =
{
{
0x80000000,
0xFFFFFFFF,
0x80000000,
DDR_MEM
},
{
0, //< QSPI
0x1FFFFFFF,
0,
DEVICE_MEM
},
{
0x20000000, //<! LPC
0x27FFFFFF,
0x20000000,
DEVICE_MEM
},
{
FDEV_BASE_ADDR, //<! Device register
FDEV_END_ADDR,
FDEV_BASE_ADDR,
DEVICE_MEM
},
{
0x30000000, //<! debug
0x39FFFFFF,
0x30000000,
DEVICE_MEM
},
{
0x3A000000, //<! Internal register space in the on-chip network
0x3AFFFFFF,
0x3A000000,
DEVICE_MEM
},
{
0x40000000,
0x7FFFFFFF,
0x40000000,
DEVICE_MEM
},
};
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif
/**
* @name: GetCpuMaskToAffval
* @msg: Convert information in cpu_mask to cluster_ID and target_list
@ -214,8 +118,3 @@ u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
return 1;
}
u64 GetMainCpuAffval(void)
{
return 0;
}

119
soc/d2000/fmmu_table.c

@ -0,0 +1,119 @@
/*
* 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: fmmu_table.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fmmu.h"
#include "ftypes.h"
#include "fparameters.h"
#ifdef __aarch64__
static const struct ArmMmuRegion mmu_ranges[] =
{
MMU_REGION_FLAT_ENTRY("DEVICE_REGION",
0x00, 0x40000000,
MT_DEVICE_NGNRE | MT_P_RW_U_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_CONFIG_REGION",
0x40000000, 0x10000000,
MT_DEVICE_NGNRNE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x50000000, 0x30000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_2G_REGION",
0x80000000, 0x80000000,
MT_NORMAL | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x1000000000, 0x1000000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_EXTEND_REGION",
0x2000000000, 0x2000000000,
MT_NORMAL | MT_RW | MT_NS),
};
const uint32_t mmu_regions_size = ARRAY_SIZE(mmu_ranges);
const struct ArmMmuConfig mmu_config =
{
.num_regions = mmu_regions_size,
.mmu_regions = mmu_ranges,
};
#else
#define DDR_MEM NORMAL_MEM
struct mem_desc platform_mem_desc[] =
{
{
0x80000000,
0xFFFFFFFF,
0x80000000,
DDR_MEM
},
{
0, //< QSPI
0x1FFFFFFF,
0,
DEVICE_MEM
},
{
0x20000000, //<! LPC
0x27FFFFFF,
0x20000000,
DEVICE_MEM
},
{
FDEV_BASE_ADDR, //<! Device register
FDEV_END_ADDR,
FDEV_BASE_ADDR,
DEVICE_MEM
},
{
0x30000000, //<! debug
0x39FFFFFF,
0x30000000,
DEVICE_MEM
},
{
0x3A000000, //<! Internal register space in the on-chip network
0x3AFFFFFF,
0x3A000000,
DEVICE_MEM
},
{
0x40000000,
0x7FFFFFFF,
0x40000000,
DEVICE_MEM
},
};
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif

5
soc/d2000/src.mk

@ -1,3 +1,4 @@
SOC_CSRCS += fparameters.c \
fioctrl.c
SOC_CSRCS += \
fmmu_table.c\
fcpu_affinity_mask.c\

60
soc/e2000/d/fcpu_affinity_mask.c

@ -0,0 +1,60 @@
/*
* 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: fcpu_affinity_mask.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fparameters.h"
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x3)
{
*cluster_id = 0x200;
if ((*cpu_mask & 0x3) == 0x3)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x1))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0x3; /* clear all mask */
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}

119
soc/e2000/fparameters.c → soc/e2000/d/fmmu_table.c

@ -11,32 +11,19 @@
* See the Phytium Public License for more details.
*
*
* FilePath: parameters.c
* Date: 2022-02-11 13:33:28
* LastEditTime: 2022-02-17 18:00:22
* FilePath: fmmu_table.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
/***************************** Include Files *********************************/
#include "fparameters.h"
#include "fmmu.h"
#include "sdkconfig.h"
/**************************** Type Definitions *******************************/
/************************** Constant Definitions *****************************/
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
/*****************************************************************************/
#ifdef CONFIG_TARGET_ARMV8_AARCH64
#ifdef __aarch64__
const struct ArmMmuRegion mmu_regions[] =
{
@ -118,99 +105,3 @@ struct mem_desc platform_mem_desc[] =
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
#if defined(CONFIG_TARGET_E2000D)
if (*cpu_mask & 0x3)
{
*cluster_id = 0x200;
if ((*cpu_mask & 0x3) == 0x3)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x1))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0x3; /* clear all mask */
}
else
{
*cpu_mask = 0;
return 0;
}
#elif defined(CONFIG_TARGET_E2000S)
if (*cpu_mask & 0x1)
{
*target_list = 1;
*cluster_id = 0x200;
*cpu_mask &= ~0x1;
}
else
{
*cpu_mask = 0;
return 0;
}
#elif defined(CONFIG_TARGET_E2000Q)
if (*cpu_mask & 0x1)
{
*target_list = 1;
*cpu_mask &= ~0x1;
}
else if (*cpu_mask & 0x2)
{
*cluster_id = 0x100;
*target_list = 1;
*cpu_mask &= ~0x2;
}
else if (*cpu_mask & 0xc)
{
*cluster_id = 0x200;
if ((*cpu_mask & 0xc) == 0xc)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x4))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0xc;
}
else
{
*cpu_mask = 0;
return 0;
}
#else
return 0;
#endif
return 1;
}
u64 GetMainCpuAffval(void)
{
return 0;
}

71
soc/e2000/q/fcpu_affinity_mask.c

@ -0,0 +1,71 @@
/*
* 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: fcpu_affinity_mask.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fparameters.h"
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x1)
{
*target_list = 1;
*cpu_mask &= ~0x1;
}
else if (*cpu_mask & 0x2)
{
*cluster_id = 0x100;
*target_list = 1;
*cpu_mask &= ~0x2;
}
else if (*cpu_mask & 0xc)
{
*cluster_id = 0x200;
if ((*cpu_mask & 0xc) == 0xc)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x4))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0xc;
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}

107
soc/e2000/q/fmmu_table.c

@ -0,0 +1,107 @@
/*
* 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: fmmu_table.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fmmu.h"
#ifdef __aarch64__
const struct ArmMmuRegion mmu_regions[] =
{
MMU_REGION_FLAT_ENTRY("DEVICE_REGION",
0x00, 0x40000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_CONFIG_REGION",
0x40000000, 0x10000000,
MT_DEVICE_NGNRNE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_IO_REGION",
0x50000000, 0x08000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x58000000, 0x28000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_2G_REGION",
0x80000000, 0x80000000,
MT_NORMAL | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x1000000000, 0x1000000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_EXTEND_REGION",
0x2000000000, 0x2000000000,
MT_NORMAL | MT_RW | MT_NS),
};
const struct ArmMmuConfig mmu_config =
{
.num_regions = ARRAY_SIZE(mmu_regions),
.mmu_regions = mmu_regions,
};
#else
#define DDR_MEM NORMAL_MEM
struct mem_desc platform_mem_desc[] =
{
{
0x00U,
0x00U + 0x40000000U,
0x00U,
DEVICE_MEM
},
{
0x40000000U,
0x40000000U + 0x10000000U,
0x40000000U,
DEVICE_MEM
},
{
0x50000000U,
0x50000000U + 0x08000000,
0x50000000U,
DEVICE_MEM
},
{
0x58000000U,
0x58000000U + 0x28000000,
0x58000000U,
DEVICE_MEM
},
{
0x80000000U,
0xffffffffU,
0x80000000U,
DDR_MEM
},
};
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif

49
soc/e2000/s/fcpu_affinity_mask.c

@ -0,0 +1,49 @@
/*
* 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: fcpu_affinity_mask.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fparameters.h"
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x1)
{
*target_list = 1;
*cluster_id = 0x200;
*cpu_mask &= ~0x1;
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}

107
soc/e2000/s/fmmu_table.c

@ -0,0 +1,107 @@
/*
* 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: fmmu_table.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fmmu.h"
#ifdef __aarch64__
const struct ArmMmuRegion mmu_regions[] =
{
MMU_REGION_FLAT_ENTRY("DEVICE_REGION",
0x00, 0x40000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_CONFIG_REGION",
0x40000000, 0x10000000,
MT_DEVICE_NGNRNE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_IO_REGION",
0x50000000, 0x08000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x58000000, 0x28000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_2G_REGION",
0x80000000, 0x80000000,
MT_NORMAL | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("PCIE_REGION",
0x1000000000, 0x1000000000,
MT_DEVICE_NGNRE | MT_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("DDR_EXTEND_REGION",
0x2000000000, 0x2000000000,
MT_NORMAL | MT_RW | MT_NS),
};
const struct ArmMmuConfig mmu_config =
{
.num_regions = ARRAY_SIZE(mmu_regions),
.mmu_regions = mmu_regions,
};
#else
#define DDR_MEM NORMAL_MEM
struct mem_desc platform_mem_desc[] =
{
{
0x00U,
0x00U + 0x40000000U,
0x00U,
DEVICE_MEM
},
{
0x40000000U,
0x40000000U + 0x10000000U,
0x40000000U,
DEVICE_MEM
},
{
0x50000000U,
0x50000000U + 0x08000000,
0x50000000U,
DEVICE_MEM
},
{
0x58000000U,
0x58000000U + 0x28000000,
0x58000000U,
DEVICE_MEM
},
{
0x80000000U,
0xffffffffU,
0x80000000U,
DDR_MEM
},
};
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif

4
soc/e2000/src.mk

@ -1,5 +1,5 @@
SOC_TYPE_NAME := $(subst ",,$(CONFIG_TARGET_TYPE_NAME))
SOC_CSRCS += fparameters.c
SOC_CSRCS += $(SOC_TYPE_NAME)/fmmu_table.c\
$(SOC_TYPE_NAME)/fcpu_affinity_mask.c

76
soc/ft2004/fcpu_affinity_mask.c

@ -0,0 +1,76 @@
/*
* 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: fcpu_affinity_mask.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fparameters.h"
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x3)
{
if ((*cpu_mask & 0x3) == 0x3)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x1))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0x3;
}
else if (*cpu_mask & 0xc)
{
*cluster_id = 0x100;
if ((*cpu_mask & 0xc) == 0xc)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x4))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0xc;
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}

69
soc/ft2004/fparameters.c → soc/ft2004/fmmu_table.c

@ -11,22 +11,20 @@
* See the Phytium Public License for more details.
*
*
* FilePath: parameters.c
* Date: 2022-02-10 14:53:42
* LastEditTime: 2022-02-17 18:01:06
* FilePath: fmmu_table.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fmmu.h"
#include "ftypes.h"
#include "sdkconfig.h"
#include "fparameters.h"
#ifdef CONFIG_TARGET_ARMV8_AARCH64
#ifdef __aarch64__
const struct ArmMmuRegion mmu_regions[] =
{
@ -116,60 +114,3 @@ struct mem_desc platform_mem_desc[] =
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x3)
{
if ((*cpu_mask & 0x3) == 0x3)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x1))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0x3;
}
else if (*cpu_mask & 0xc)
{
*cluster_id = 0x100;
if ((*cpu_mask & 0xc) == 0xc)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x4))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0xc;
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}
u64 GetMainCpuAffval(void)
{
return 0;
}

5
soc/ft2004/src.mk

@ -1,3 +1,4 @@
SOC_CSRCS += fparameters.c \
fioctrl.c
SOC_CSRCS += \
fmmu_table.c\
fcpu_affinity_mask.c

71
soc/phytiumpi/fcpu_affinity_mask.c

@ -0,0 +1,71 @@
/*
* 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: fcpu_affinity_mask.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
#include "fparameters.h"
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x1)
{
*target_list = 1;
*cpu_mask &= ~0x1;
}
else if (*cpu_mask & 0x2)
{
*cluster_id = 0x100;
*target_list = 1;
*cpu_mask &= ~0x2;
}
else if (*cpu_mask & 0xc)
{
*cluster_id = 0x200;
if ((*cpu_mask & 0xc) == 0xc)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x4))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0xc;
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}

77
soc/phytiumpi/fparameters.c → soc/phytiumpi/fmmu_table.c

@ -11,32 +11,19 @@
* See the Phytium Public License for more details.
*
*
* FilePath: parameters.c
* Date: 2022-02-11 13:33:28
* LastEditTime: 2022-02-17 18:00:22
* FilePath: fmmu_table.c
* Date: 2023-11-6 10:33:28
* LastEditTime: 2023-11-6 10:33:28
* Description:  This file is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
* 1.0 zhangyan 2023/11/6 init commit
*/
/***************************** Include Files *********************************/
#include "fparameters.h"
#include "fmmu.h"
#include "sdkconfig.h"
/**************************** Type Definitions *******************************/
/************************** Constant Definitions *****************************/
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
/*****************************************************************************/
#ifdef CONFIG_TARGET_ARMV8_AARCH64
#ifdef __aarch64__
const struct ArmMmuRegion mmu_regions[] =
{
@ -109,57 +96,3 @@ struct mem_desc platform_mem_desc[] =
const u32 platform_mem_desc_size = sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]);
#endif
u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
{
if (*cpu_mask == 0)
{
return 0;
}
*target_list = 0;
*cluster_id = 0;
if (*cpu_mask & 0x1)
{
*target_list = 1;
*cpu_mask &= ~0x1;
}
else if (*cpu_mask & 0x2)
{
*cluster_id = 0x100;
*target_list = 1;
*cpu_mask &= ~0x2;
}
else if (*cpu_mask & 0xc)
{
*cluster_id = 0x200;
if ((*cpu_mask & 0xc) == 0xc)
{
*target_list = 3;
}
else if ((*cpu_mask & 0x4))
{
*target_list = 1;
}
else
{
*target_list = 2;
}
*cpu_mask &= ~0xc;
}
else
{
*cpu_mask = 0;
return 0;
}
return 1;
}
u64 GetMainCpuAffval(void)
{
return 0;
}

4
soc/phytiumpi/src.mk

@ -2,4 +2,6 @@
SOC_TYPE_NAME := $(subst ",,$(CONFIG_TARGET_TYPE_NAME))
SOC_CSRCS += fparameters.c
SOC_CSRCS += \
fmmu_table.c\
fcpu_affinity_mask.c

96
third-party/lwip-2.1.2/ports/fgmac/ethernetif.c

@ -31,6 +31,8 @@
#include "../include/netif/ethernet.h"
#include "../include/lwip/etharp.h"
#include "../include/lwip/debug.h"
#include "../include/lwip/sys.h"
#include "../include/lwip/igmp.h"
#include "sdkconfig.h"
#include "fparameters.h"
#include "lwip_port.h"
@ -62,6 +64,9 @@
#define ETHNETIF_DEBUG_E(format, ...) FT_DEBUG_PRINT_E(ETHNETIF_DEBUG_TAG, format, ##__VA_ARGS__)
#define ETHNETIF_DEBUG_W(format, ...) FT_DEBUG_PRINT_W(ETHNETIF_DEBUG_TAG, format, ##__VA_ARGS__)
#if LWIP_IGMP
static err_t gmac_filter_update (struct netif *netif,const ip4_addr_t *group, enum netif_mac_filter_action action);
#endif
/**
* This function should do the actual transmission of the packet. The packet is
* contained in the pbuf that is passed to the function. This pbuf
@ -270,6 +275,8 @@ static err_t low_level_init(struct netif *netif)
instance_p->hwaddr[i] = netif->hwaddr[i];
}
instance_p->feature=config_p->capability;
ret = FGmacLwipPortInit(instance_p);
if (ret != FT_SUCCESS)
@ -342,6 +349,11 @@ err_t ethernetif_gmac_init(struct netif *netif)
netif->output = low_level_output_arp_off;
#endif /* LWIP_ARP */
#endif /* LWIP_ARP || LWIP_ETHERNET */
#if LWIP_IGMP
netif_set_igmp_mac_filter(netif,gmac_filter_update);
#endif
#endif /* LWIP_IPV4 */
netif->linkoutput = low_level_output;
@ -354,4 +366,88 @@ err_t ethernetif_gmac_init(struct netif *netif)
return ERR_OK;
}
#if LWIP_IGMP
static void gmac_hash_update (struct netif *netif, u8_t *ip_addr,
u8_t action)
{
u8_t multicast_mac_addr[6];
struct LwipPort *lwip_port;
FGmacLwipPort *instance_p;
lwip_port = (struct LwipPort *) (netif->state);
instance_p = (FGmacLwipPort *)lwip_port->state;
multicast_mac_addr[0] = 0x01;
multicast_mac_addr[1] = 0x00;
multicast_mac_addr[2] = 0x5E;
multicast_mac_addr[3] = ip_addr[1] & 0x7F;
multicast_mac_addr[4] = ip_addr[2];
multicast_mac_addr[5] = ip_addr[3];
SYS_ARCH_DECL_PROTECT(lev);
SYS_ARCH_PROTECT(lev);
/* Stop Intr */
FGmacSetInterruptMask(&instance_p->instance, FGMAC_CTRL_INTR, FGMAC_ISR_MASK_ALL_BITS);
FGmacSetInterruptMask(&instance_p->instance, FGMAC_DMA_INTR, FGMAC_DMA_INTR_ENA_ALL_MASK);
/* Stop Ethernet */
FGmacStop(&instance_p->instance);
if (action == IGMP_ADD_MAC_FILTER)
{
/* Set Mulitcast mac address in hash table */
FGmac_SetHash(&instance_p->instance, multicast_mac_addr);
}
else if (action == IGMP_DEL_MAC_FILTER)
{
/* Remove Mulitcast mac address in hash table */
FGmac_DeleteHash(&instance_p->instance, multicast_mac_addr);
}
/* Clear any existed intr status */
FGmacClearIntrStatus(&instance_p->instance);
/* Start Ethernet */
FGmacStartTrans(&instance_p->instance);
/* Start Intr */
FGmacSetInterruptUmask(&instance_p->instance, FGMAC_CTRL_INTR, FGMAC_ISR_MASK_RSIM);
FGmacSetInterruptUmask(&instance_p->instance, FGMAC_DMA_INTR,
FGMAC_DMA_INTR_ENA_NIE | FGMAC_DMA_INTR_ENA_RIE | FGMAC_DMA_INTR_ENA_AIE);
SYS_ARCH_UNPROTECT(lev);
}
static err_t gmac_filter_update (struct netif *netif, const ip4_addr_t *group,enum netif_mac_filter_action action)
{
u8_t temp_mask;
unsigned int i;
u8_t * ip_addr = (u8_t *) group;
if ((ip_addr[0] < 224) && (ip_addr[0] > 239))
{
LWIP_DEBUGF(NETIF_DEBUG,
("%s: The requested MAC address is not a multicast address.\r\n", __func__));
LWIP_DEBUGF(NETIF_DEBUG,
("Multicast address add operation failure !!\r\n"));
return ERR_ARG;
}
if (action == IGMP_ADD_MAC_FILTER)
{
/* Update mac address in hash table */
gmac_hash_update(netif, ip_addr, action);
LWIP_DEBUGF(NETIF_DEBUG,
("%s: Multicast MAC address successfully added.\r\n", __func__));
return ERR_OK;
}
else if (action == IGMP_DEL_MAC_FILTER)
{
/* Update mac address in hash table */
gmac_hash_update(netif, ip_addr, action);
LWIP_DEBUGF(NETIF_DEBUG,
("%s: Multicast MAC address successfully removed.\r\n", __func__));
return ERR_OK;
}
}
#endif

5
third-party/lwip-2.1.2/ports/fgmac/fgmac_lwip_port.c

@ -293,7 +293,10 @@ FError FGmacLwipPortInit(FGmacLwipPort * instance_p)
/* code */
FGMAC_LWIP_PORT_GMAC_DEBUG_W("mac addr[%d] is %x ",i,instance_p->hwaddr[i]);
}
if(instance_p->feature & FGMAC_LWIP_PORT_CONFIG_MULTICAST_ADDRESS_FILITER)
{
FGmacMulticastHashEnable(gmac_p);
}
FGmacSetMacAddr(instance_p->instance.config.base_addr, (void *)(instance_p->hwaddr));
/* step 4: initialize phy */

4
third-party/lwip-2.1.2/ports/fgmac/fgmac_lwip_port.h

@ -78,6 +78,9 @@ extern "C"
#define GMAC_RX_DESCNUM 128
#define GMAC_TX_DESCNUM 128
#define FGMAC_LWIP_PORT_CONFIG_MULTICAST_ADDRESS_FILITER BIT(1) /* Allow multicast address hash filtering */
typedef struct
{
u32 instance_id;
@ -98,6 +101,7 @@ typedef struct
u8 is_ready; /* Ft_LwipPort_Gmac Object first need Init use Ft_LwipPort_GmacObjec_Init */
struct LwipPort *stack_pointer; /* Docking data stack data structure */
u32 feature;
u8 hwaddr[FGMAX_MAX_HARDWARE_ADDRESS_LENGTH];
} FGmacLwipPort;

4
third-party/lwip-2.1.2/ports/fxmac/ethernetif.c

@ -52,7 +52,7 @@
#endif
#if LWIP_IGMP
static err_t xmac_filter_update (struct netif *netif,const ip_addr_t *group, enum netif_mac_filter_action action);
static err_t xmac_filter_update (struct netif *netif,const ip4_addr_t *group, enum netif_mac_filter_action action);
static u8_t xmac_multicast_entry_mask = 0;
#endif
@ -514,7 +514,7 @@ static void xmac_hash_update (struct netif *netif, u8_t *ip_addr,
SYS_ARCH_UNPROTECT(lev);
}
static err_t xmac_filter_update (struct netif *netif, const ip_addr_t *group,enum netif_mac_filter_action action)
static err_t xmac_filter_update (struct netif *netif, const ip4_addr_t *group,enum netif_mac_filter_action action)
{
u8_t temp_mask;
unsigned int i;

Loading…
Cancel
Save