diff --git a/.gitlab/README_TEMPLATE.zh-CN.md b/.gitlab/README_TEMPLATE.zh-CN.md
new file mode 100644
index 0000000000000000000000000000000000000000..547b70118eb7b5db78d6ba9746fd496d736e7503
--- /dev/null
+++ b/.gitlab/README_TEMPLATE.zh-CN.md
@@ -0,0 +1,50 @@
+
+# XXX
+
+## 1. 例程介绍
+
+>介绍例程的用途,使用场景,相关基本概念,描述用户可以使用例程完成哪些工作
+
+## 2. 如何使用例程
+
+>描述开发平台准备,使用例程配置,构建和下载镜像的过程
+
+### 2.1 硬件配置方法
+
+>哪些硬件平台是支持的,需要哪些外设,例程与开发板哪些IO口相关等(建议附录开发板照片,展示哪些IO口被引出)
+
+### 2.2 SDK配置方法
+
+>依赖哪些驱动、库和第三方组件,如何完成配置(列出需要使能的关键配置项)
+
+### 2.3 构建和下载
+
+>描述构建、烧录下载镜像的过程,列出相关的命令
+
+### 2.4 输出与实验现象
+
+>描述输入输出情况,列出存在哪些输出,对应的输出是什么(建议附录相关现象图片)
+
+## 3. 如何解决问题
+
+>主要记录使用例程中可能会遇到的问题,给出相应的解决方案
+
+## 4. 修改历史记录
+
+>记录例程的重大修改记录,标明修改发生的版本号
+
+
+
+
diff --git a/.gitlab/issue_templates/ISSUE_TEMPLATE.zh-CN.md b/.gitlab/issue_templates/ISSUE_TEMPLATE.zh-CN.md
new file mode 100644
index 0000000000000000000000000000000000000000..f09d98dde9597de75ffcdb237c2b580b8fffa3f9
--- /dev/null
+++ b/.gitlab/issue_templates/ISSUE_TEMPLATE.zh-CN.md
@@ -0,0 +1,13 @@
+### 该问题是怎么引起的?
+
+
+
+### 重现步骤
+
+
+
+### 报错信息
+
+
+
+
diff --git a/.gitlab/merge_request_templates/PULL_REQUEST_TEMPLATE.md b/.gitlab/merge_request_templates/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000000000000000000000000000000000..55b8b555888777ab6b276977c78c62f2ad97c4d1
--- /dev/null
+++ b/.gitlab/merge_request_templates/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,45 @@
+
+## 拉取/合并请求描述:
+
+[
+这段方括号里的内容是您**必须填写并替换掉**的,否则PR不可能被合并。**方括号外面的内容不需要修改,但请仔细阅读。**
+请在这里填写您的PR描述,可以包括以下之一的内容:
+为什么提交这份PR;解决的问题是什么,你的解决方案是什么;
+并确认并列出已经在什么情况或板卡上进行了测试;
+并且附上测试结果于测试流程,如果代码存在耦合,则需要对耦合部分进行修改。
+
+]
+
+
+以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
+
+### 当前拉取/合并请求的状态
+
+必须选择一项 :
+
+- [ ] 本拉取/合并请求是一个草稿版本
+- [ ] 本拉取/合并请求是一个成熟版本
+
+### 代码质量 Code Quality:
+
+我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
+
+- [ ] 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
+- [ ] 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
+- [ ] 没有垃圾代码,代码尽量精简,不包含`#if 0`代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
+- [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
+- [ ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
+- [ ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality
+- [ ] 本拉取/合并符合[代码规范](../documentation/coding_style_cn.md)
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 51b1293042abf70cb72b91816dd1860126ee533f..0000000000000000000000000000000000000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "files.associations": {
- "freertos.h": "c",
- "generic_timer.h": "c",
- "ft_types.h": "c",
- "ft_assert.h": "c",
- "queue.h": "c",
- "*.tcc": "c",
- "ft_debug.h": "c",
- "pl011_uart.h": "c",
- "gicv3.h": "c",
- "interrupt.h": "c",
- "task.h": "c",
- "trap.h": "c",
- "parameters.h": "c",
- "ip4_addr.h": "c",
- "gmac_hw.h": "c",
- "sdkconfig.h": "c",
- "timeouts.h": "c",
- "fsleep.h": "c",
- "freertosconfig.h": "c",
- "mem.h": "c",
- "ft_os_gmac.h": "c",
- "gmac.h": "c",
- "list.h": "c",
- "netif.h": "c",
- "system_error": "cpp",
- "functional": "c",
- "event_groups.h": "c",
- "condition_variable": "c",
- "future": "c",
- "stats.h": "c",
- "aarch32.h": "c",
- "aarch64.h": "c",
- "gmac_dma.h": "c",
- "debug.h": "c",
- "ethernetif.h": "c",
- "tcpip.h": "c",
- "init.h": "c",
- "ethernet.h": "c",
- "stdio.h": "c",
- "semphr.h": "c",
- "portmacro.h": "c",
- "fwdt.h": "c"
- }
-}
\ No newline at end of file
diff --git a/configs/d2000_aarch32_defconfig b/configs/d2000_aarch32_defconfig
index 15b70295b43e2cce9f15f5135761beb793bc5c61..b20e08ce61e3b2abb80fb2b4891588b3cedc43e1 100644
--- a/configs/d2000_aarch32_defconfig
+++ b/configs/d2000_aarch32_defconfig
@@ -37,7 +37,7 @@ CONFIG_TARGET_D2000=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
# CONFIG_USE_SERIAL is not set
#
@@ -54,7 +54,7 @@ CONFIG_USE_ETH=y
# Eth Configuration
#
# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
+CONFIG_ENABLE_FGMAC=y
#
# F_GMAC Configuration
@@ -109,7 +109,7 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
+CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x100000
# end of GNU Linker Setting
# end of Building Option
diff --git a/configs/d2000_aarch64_defconfig b/configs/d2000_aarch64_defconfig
index 9471b8bdeded298a56ebe903847b1502c895982a..a1bffdcdfec97b5bff6b4ae9cddf64e713220947 100644
--- a/configs/d2000_aarch64_defconfig
+++ b/configs/d2000_aarch64_defconfig
@@ -38,7 +38,7 @@ CONFIG_TARGET_D2000=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
# CONFIG_USE_SERIAL is not set
#
@@ -55,7 +55,7 @@ CONFIG_USE_ETH=y
# Eth Configuration
#
# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
+CONFIG_ENABLE_FGMAC=y
#
# F_GMAC Configuration
@@ -107,7 +107,7 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
+CONFIG_HEAP_SIZE=1
CONFIG_STACK_TOP_ADDR=0x82000000
# end of Linker Options
# end of Building Option
diff --git a/configs/ft2004_aarch32_defconfig b/configs/ft2004_aarch32_defconfig
index 3e86c9957c25636d1401a2abc39bbcbffa7c3556..ff4828589de1e1c11c1d24101eaff727954aebe9 100644
--- a/configs/ft2004_aarch32_defconfig
+++ b/configs/ft2004_aarch32_defconfig
@@ -39,7 +39,7 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
# CONFIG_USE_SERIAL is not set
#
@@ -56,7 +56,7 @@ CONFIG_USE_ETH=y
# Eth Configuration
#
# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
+CONFIG_ENABLE_FGMAC=y
#
# F_GMAC Configuration
@@ -109,7 +109,7 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
+CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x100000
# end of GNU Linker Setting
# end of Building Option
diff --git a/configs/ft2004_aarch64_defconfig b/configs/ft2004_aarch64_defconfig
index 84c05b885af2b4174301eded55a4599f2b95a349..9c842ff9054520e5b1dfe5a71b3756743e9b850a 100644
--- a/configs/ft2004_aarch64_defconfig
+++ b/configs/ft2004_aarch64_defconfig
@@ -37,7 +37,7 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
# CONFIG_USE_SERIAL is not set
#
@@ -54,7 +54,7 @@ CONFIG_USE_ETH=y
# Eth Configuration
#
# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
+CONFIG_ENABLE_FGMAC=y
#
# F_GMAC Configuration
diff --git a/docs/Changlog.md b/docs/Changlog.md
index 7d93c22a57ddd0dae2f5f38b0e0f0a449e97f853..70b22bbb03d64b063310ffd996d6c74349982522 100644
--- a/docs/Changlog.md
+++ b/docs/Changlog.md
@@ -11,6 +11,15 @@
* Ver Who Date Changes
* ----- ------ -------- --------------------------------------
-->
+# Phytium FreeRTOS SDK v0.0.6 ChangeLog
+
+Change Log sinc 0.0.5, 2021.12.23
+
+## example
+
+- adapt to the new standalone sdk v0.1.15
+- reconstruct the aarch framework for freertos
+
# Phytium FreeRTOS SDK v0.0.5 ChangeLog
Change Log sinc 0.0.4, 2021.11.2
diff --git a/drivers/ft_os_uart.c b/drivers/ft_os_uart.c
index 148b5f9b49437e5fa5f17ee856b6474eea7719a0..674ac4c698f6c7b0d29267b361cea345c23a12cc 100644
--- a/drivers/ft_os_uart.c
+++ b/drivers/ft_os_uart.c
@@ -152,93 +152,6 @@ s32 FtFreertosUartReceiveBuffer(FtFreertosUart *uart_p, u8 *buffer, u32 length,
return ret;
}
-// s32 Ft_Os_UartReceiveBuffer(Ft_Os_Uart *OsUartPtr, u8 *buffer, u32 length, u32 *Received)
-// {
-// u32 GetLength;
-// Ft_Uart *UartPtr;
-// EventBits_t ev;
-// s32 ret;
-// if (NULL == OsUartPtr)
-// {
-// return FST_INSTANCE_NOT_FOUND;
-// }
-
-// if (NULL == buffer)
-// {
-// return FST_FAILURE;
-// }
-
-// if (NULL == Received)
-// {
-// return FST_FAILURE;
-// }
-
-// if (0 == length)
-// {
-// *Received = 0;
-// return FST_SUCCESS;
-// }
-
-// UartPtr = &OsUartPtr->UartObj;
-
-// /* New transfer can be performed only after current one is finished */
-// if (pdFALSE == xSemaphoreTake(OsUartPtr->rxSemaphore, portMAX_DELAY))
-// {
-// /* We could not take the semaphore, exit with 0 data received */
-// ret = FST_FAILURE;
-// }
-
-// GetLength = FUart_Receive(UartPtr, buffer, length);
-// if (GetLength > 0)
-// {
-// *Received = GetLength;
-// ret = FST_SUCCESS;
-// }
-// else
-// {
-// u32 RegTemp;
-
-// RegTemp = FUart_GetInterruptMask(UartPtr);
-// RegTemp |= UARTMIS_RTMIS;
-// FUart_SetInterruptMask(UartPtr, RegTemp);
-
-// ev = xEventGroupWaitBits(OsUartPtr->rxEvent,
-// RTOS_UART_COMPLETE | RTOS_UART_HARDWARE_BUFFER_OVERRUN | RTOS_UART_RECV_ERROR,
-// pdTRUE, pdFALSE, portMAX_DELAY);
-
-// if (ev & RTOS_UART_HARDWARE_BUFFER_OVERRUN)
-// {
-// ret = FST_FIFO_ERROR;
-// *Received = 0;
-// }
-// else if (ev & RTOS_UART_COMPLETE)
-// {
-// ret = FST_SUCCESS;
-// *Received = UartPtr->ReceiveBuffer.RequestedBytes - UartPtr->ReceiveBuffer.RemainingBytes;
-// }
-// else if (ev & RTOS_UART_RECV_ERROR)
-// {
-// ret = FST_RECV_ERROR;
-// *Received = 0;
-// }
-// else
-// {
-// ret = FST_INVALID_PARAM;
-// *Received = 0;
-// }
-// }
-
-// /* Enable next transfer. Current one is finished */
-// if (pdFALSE == xSemaphoreGive(OsUartPtr->rxSemaphore))
-// {
-// /* We could not post the semaphore, exit with error */
-// Ft_printf("FST_FAILURE xSemaphoreGive \r\n");
-// ret = FST_FAILURE;
-// }
-
-// return ret;
-// }
-
s32 FtFreertosUartBlcokingSend(FtFreertosUart *uart_p, u8 *buffer, u32 length)
{
ft_error_t ret = FT_SUCCESS;
@@ -269,43 +182,5 @@ s32 FtFreertosUartBlcokingSend(FtFreertosUart *uart_p, u8 *buffer, u32 length)
return ret;
}
-// s32 Ft_Os_UartBlockingSend(Ft_Os_Uart *OsUartPtr, u8 *buffer, u32 length)
-// {
-// s32 ret = FST_SUCCESS;
-// Ft_Uart *UartPtr;
-// EventBits_t ev;
-// if (NULL == OsUartPtr)
-// {
-// return FST_INSTANCE_NOT_FOUND;
-// }
-
-// if (NULL == buffer)
-// {
-// return FST_FAILURE;
-// }
-
-// UartPtr = &OsUartPtr->UartObj;
-
-// if (pdFALSE == xSemaphoreTake(OsUartPtr->txSemaphore, portMAX_DELAY))
-// {
-// return FST_FAILURE;
-// }
-
-// FUart_Send(UartPtr, buffer, length);
-
-// ev = xEventGroupWaitBits(OsUartPtr->txEvent, RTOS_UART_COMPLETE, pdTRUE, pdFALSE, portMAX_DELAY);
-// if (!(ev & RTOS_UART_COMPLETE))
-// {
-// ret = FST_FAILURE;
-// }
-
-// if (pdFALSE == xSemaphoreGive(OsUartPtr->txSemaphore))
-// {
-// /* We could not post the semaphore, exit with error */
-// ret = FST_FAILURE;
-// }
-
-// return ret;
-// }
#endif
diff --git a/example/freertos_test/README.md b/example/freertos_test/README.md
index 557c184eed7a3c1724d305354ce07dd59d24bb4a..59086c1da707c1bd3578d9c93bb95ad0b6fb3ee1 100644
--- a/example/freertos_test/README.md
+++ b/example/freertos_test/README.md
@@ -70,20 +70,47 @@ PRIORITY_TEST----任务优先级测试
THREAD_LOCAL_TEST----线程局部存储thread local storage测试
TIMER_TEST----定时器测试
```
+
+本例子已经提供好具体的编译指令,以下进行介绍:
+- make 将目录下的工程进行编译
+- make clean 将目录下的工程进行清理
+- make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址
+- make load_d2000_aarch64 将预设64bit d2000 下的配置加载至工程中
+- make load_d2000_aarch32 将预设32bit d2000 下的配置加载至工程中
+- make load_ft2004_aarch64 将预设64bit ft2004 下的配置加载至工程中
+- make load_ft2004_aarch32 将预设32bit ft2004 下的配置加载至工程中
+- make menuconfig 配置目录下的参数变量
+- make backup_kconfig 将目录下的sdkconfig 备份到./configs下
+
+具体使用方法为:
+- 在当前目录下
+- 执行以上指令
+
### 2.3 构建和下载
#### 2.3.1 构建过程
- 在host侧完成配置
->配置成D2000,对于其它平台,使用对于的默认配置,如FT2000-4 `make config_ft2004_configs`
+>配置成ft2004,对于其它平台,使用对于的默认配置,如D2000 `make load_d2000_aarch32`
+
+- 选择目标平台
+```
+make load_ft2004_aarch32
+```
+
+- 选择例程需要的配置
+```
+make menuconfig
+```
+
+- 进行编译
```
-$ make config_d2000_configs
-$ make menuconfig
+make
```
-- 在host侧完成构建
+- 将编译出的镜像放置到tftp目录下
```
-$ make
+make boot
```
#### 2.3.2 下载过程
diff --git a/example/freertos_test/configs/d2000_aarch32_eg_configs b/example/freertos_test/configs/d2000_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..0dfaa7ac2369850dfd9af7c301f59aca89ff411f
--- /dev/null
+++ b/example/freertos_test/configs/d2000_aarch32_eg_configs
@@ -0,0 +1,135 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_SDMMC is not set
+# CONFIG_USE_PCIE is not set
+CONFIG_USE_WDT=y
+
+#
+# FWDT Configuration
+#
+CONFIG_ENABLE_FWDT=y
+# end of FWDT Configuration
+
+# CONFIG_USE_DMA is not set
+# CONFIG_USE_NAND is not set
+# CONFIG_USE_RTC is not set
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/freertos_test/configs/d2000_aarch64_eg_configs b/example/freertos_test/configs/d2000_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..f83c5237390d139dc4e454bc74f63302238e8480
--- /dev/null
+++ b/example/freertos_test/configs/d2000_aarch64_eg_configs
@@ -0,0 +1,129 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_SDMMC is not set
+# CONFIG_USE_PCIE is not set
+CONFIG_USE_WDT=y
+
+#
+# FWDT Configuration
+#
+CONFIG_ENABLE_FWDT=y
+# end of FWDT Configuration
+
+# CONFIG_USE_DMA is not set
+# CONFIG_USE_NAND is not set
+# CONFIG_USE_RTC is not set
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/freertos_test/configs/ft2004_aarch32_eg_configs b/example/freertos_test/configs/ft2004_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..0f8e8d966965f2bfe4d08edb3419f62e5de374c2
--- /dev/null
+++ b/example/freertos_test/configs/ft2004_aarch32_eg_configs
@@ -0,0 +1,135 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_SDMMC is not set
+# CONFIG_USE_PCIE is not set
+CONFIG_USE_WDT=y
+
+#
+# FWDT Configuration
+#
+CONFIG_ENABLE_FWDT=y
+# end of FWDT Configuration
+
+# CONFIG_USE_DMA is not set
+# CONFIG_USE_NAND is not set
+# CONFIG_USE_RTC is not set
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/freertos_test/configs/ft2004_aarch64_eg_configs b/example/freertos_test/configs/ft2004_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..273b87420b590a3e55ed293be8621baaccfdf7c0
--- /dev/null
+++ b/example/freertos_test/configs/ft2004_aarch64_eg_configs
@@ -0,0 +1,129 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_SDMMC is not set
+# CONFIG_USE_PCIE is not set
+CONFIG_USE_WDT=y
+
+#
+# FWDT Configuration
+#
+CONFIG_ENABLE_FWDT=y
+# end of FWDT Configuration
+
+# CONFIG_USE_DMA is not set
+# CONFIG_USE_NAND is not set
+# CONFIG_USE_RTC is not set
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/freertos_test/main.c b/example/freertos_test/main.c
index fcde60fdb14379cf4f0999beb9b51566debefc3c..69c2be1259c562e5bd4c985a23478b396ae9d801 100644
--- a/example/freertos_test/main.c
+++ b/example/freertos_test/main.c
@@ -18,9 +18,7 @@
#include "task.h"
#include "unity.h"
-// #define EVENT_GROUPS_TEST 1
-// #define TRACE_FACILITY_TEST 1
-#if 1
+
#define ISR_FLOAT_TEST 1
#define BACKPORT_TEST 1
#define DEBUG_QUEUE_REGISTER_TEST 1
@@ -41,7 +39,7 @@
#define PRIORITY_TEST 1
#define THREAD_LOCAL_TEST 1
#define TIMER_TEST 1
-#endif
+
#if ISR_FLOAT_TEST
extern BaseType_t TestFloatIsrEntry(void);
diff --git a/example/freertos_test/sdkconfig b/example/freertos_test/sdkconfig
index a4853dd591e2151b0b2ee2a6b5393ecc8b53ea44..f83c5237390d139dc4e454bc74f63302238e8480 100644
--- a/example/freertos_test/sdkconfig
+++ b/example/freertos_test/sdkconfig
@@ -21,7 +21,7 @@ CONFIG_TARGET_ARMV8_AARCH64=y
CONFIG_USE_CACHE=y
CONFIG_USE_L3CACHE=y
CONFIG_USE_MMU=y
-CONFIG_USE_SYS_TICK=y
+# CONFIG_USE_SYS_TICK is not set
# end of Arch Configuration
#
@@ -38,7 +38,7 @@ CONFIG_TARGET_D2000=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
# CONFIG_USE_SERIAL is not set
# CONFIG_USE_GPIO is not set
# CONFIG_USE_IOMUX is not set
@@ -47,15 +47,10 @@ CONFIG_USE_ETH=y
#
# Eth Configuration
#
-# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
-
-#
-# F_GMAC Configuration
-#
-CONFIG_F_GMAC_PHY_COMMON=y
-# CONFIG_F_GMAC_PHY_AR803X is not set
-# end of F_GMAC 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
@@ -73,6 +68,7 @@ CONFIG_ENABLE_FWDT=y
# CONFIG_USE_DMA is not set
# CONFIG_USE_NAND is not set
+# CONFIG_USE_RTC is not set
# end of Components Configuration
CONFIG_USE_G_LIBC=y
@@ -87,6 +83,7 @@ CONFIG_USE_G_LIBC=y
# Cross-Compiler Setting
#
CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
# CONFIG_USE_EXT_COMPILER is not set
# end of Cross-Compiler Setting
@@ -102,7 +99,6 @@ CONFIG_LOG_INFO=y
#
# CONFIG_AARCH32_RAM_LD is not set
CONFIG_AARCH64_RAM_LD=y
-# CONFIG_QEMU_AARCH32_RAM_LD is not set
# CONFIG_USER_DEFINED_LD is not set
CONFIG_LINK_SCRIPT_ROM=y
CONFIG_ROM_START_UP_ADDR=0x80100000
@@ -110,8 +106,8 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
-CONFIG_STACK_TOP_ADDR=0x82000000
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
# end of Linker Options
# end of Building Option
diff --git a/example/freertos_test/sdkconfig.h b/example/freertos_test/sdkconfig.h
index 76216d099a0b2c0684db80396c1931fc06ec9736..0db78ce5d1b4116aa7f0218d1fef3be0168ad701 100644
--- a/example/freertos_test/sdkconfig.h
+++ b/example/freertos_test/sdkconfig.h
@@ -20,7 +20,7 @@
#define CONFIG_USE_CACHE
#define CONFIG_USE_L3CACHE
#define CONFIG_USE_MMU
-#define CONFIG_USE_SYS_TICK
+/* CONFIG_USE_SYS_TICK is not set */
/* end of Arch Configuration */
/* Board Configuration */
@@ -35,7 +35,7 @@
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#define CONFIG_USE_GIC
-#define CONFIG_EBABLE_GICV3
+#define CONFIG_ENABLE_GICV3
/* CONFIG_USE_SERIAL is not set */
/* CONFIG_USE_GPIO is not set */
/* CONFIG_USE_IOMUX is not set */
@@ -43,14 +43,10 @@
/* Eth Configuration */
-/* CONFIG_ENABLE_F_XMAC is not set */
-#define CONFIG_ENABLE_F_GMAC
-
-/* F_GMAC Configuration */
-
-#define CONFIG_F_GMAC_PHY_COMMON
-/* CONFIG_F_GMAC_PHY_AR803X is not set */
-/* end of F_GMAC Configuration */
+/* CONFIG_ENABLE_FXMAC is not set */
+#define CONFIG_ENABLE_FGMAC
+#define CONFIG_FGMAC_PHY_COMMON
+/* CONFIG_FGMAC_PHY_AR803X is not set */
/* end of Eth Configuration */
/* CONFIG_USE_CAN is not set */
/* CONFIG_USE_I2C is not set */
@@ -65,6 +61,7 @@
/* end of FWDT Configuration */
/* CONFIG_USE_DMA is not set */
/* CONFIG_USE_NAND is not set */
+/* CONFIG_USE_RTC is not set */
/* end of Components Configuration */
#define CONFIG_USE_G_LIBC
/* CONFIG_USE_NEW_LIBC is not set */
@@ -75,6 +72,7 @@
/* Cross-Compiler Setting */
#define CONFIG_COMPILER_NO_STD_STARUP
+#define CONFIG_GCC_OPTIMIZE_LEVEL 0
/* CONFIG_USE_EXT_COMPILER is not set */
/* end of Cross-Compiler Setting */
/* CONFIG_LOG_VERBOS is not set */
@@ -88,7 +86,6 @@
/* CONFIG_AARCH32_RAM_LD is not set */
#define CONFIG_AARCH64_RAM_LD
-/* CONFIG_QEMU_AARCH32_RAM_LD is not set */
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_LINK_SCRIPT_ROM
#define CONFIG_ROM_START_UP_ADDR 0x80100000
@@ -96,8 +93,8 @@
#define CONFIG_LINK_SCRIPT_RAM
#define CONFIG_RAM_START_UP_ADDR 0x81000000
#define CONFIG_RAM_SIZE_MB 64
-#define CONFIG_HEAP_SIZE 0x100000
-#define CONFIG_STACK_TOP_ADDR 0x82000000
+#define CONFIG_HEAP_SIZE 1
+#define CONFIG_STACK_SIZE 0x400
/* end of Linker Options */
/* end of Building Option */
diff --git a/example/function_test/configs/d2000_aarch32_eg_configs b/example/function_test/configs/d2000_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..474c4a220ce036fcbe0742a8c8f624a6d6a6fd9c
--- /dev/null
+++ b/example/function_test/configs/d2000_aarch32_eg_configs
@@ -0,0 +1,133 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/function_test/configs/d2000_aarch64_eg_configs b/example/function_test/configs/d2000_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..5e3e88df83e286f635bb2ebbb8bd2c015d9a6482
--- /dev/null
+++ b/example/function_test/configs/d2000_aarch64_eg_configs
@@ -0,0 +1,127 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/function_test/configs/ft2004_aarch32_eg_configs b/example/function_test/configs/ft2004_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..dcc38b232fb654346c396c799906eb6125f7bb60
--- /dev/null
+++ b/example/function_test/configs/ft2004_aarch32_eg_configs
@@ -0,0 +1,133 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/function_test/configs/ft2004_aarch64_eg_configs b/example/function_test/configs/ft2004_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..ffdfab4162c4f46a676226a500a9cd5023cb359a
--- /dev/null
+++ b/example/function_test/configs/ft2004_aarch64_eg_configs
@@ -0,0 +1,127 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/function_test/main.c b/example/function_test/main.c
index 82fe52929e87cb9a646d94440bbc127fb19c1b0f..d2bda41acf6686ba0153bb7d2045612e56866f74 100644
--- a/example/function_test/main.c
+++ b/example/function_test/main.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0.
*
* @Date: 2021-07-09 08:08:39
- * @LastEditTime: 2021-07-22 09:22:21
+ * @LastEditTime: 2021-12-15 16:57:31
* @Description: This files is for
*
* @Modify History:
@@ -20,7 +20,7 @@ extern BaseType_t TestMsgQueueEntry();
int main()
{
BaseType_t xReturn = pdPASS;
-
+ printf("main is start \r\n") ;
xReturn = TestCpuStatsEntry();
if (pdPASS != xReturn)
{
@@ -33,6 +33,7 @@ int main()
goto FAIL_EXIT;
}
+ printf("vTaskStartScheduler \r\n") ;
vTaskStartScheduler(); /* 启动任务,开启调度 */
while (1); /* 正常不会执行到这里 */
diff --git a/example/function_test/sdkconfig b/example/function_test/sdkconfig
index bf666aa6a42ab9dcb5e025bc64b7b55ef398c817..5e3e88df83e286f635bb2ebbb8bd2c015d9a6482 100644
--- a/example/function_test/sdkconfig
+++ b/example/function_test/sdkconfig
@@ -2,9 +2,7 @@
#
# Project Configuration
#
-CONFIG_TARGET_NAME="ft2004_freertos"
-#CONFIG_LWIP_POLL_TEST=y
-# CONFIG_LWIP_INTRRUPT_TEST is not set
+CONFIG_TARGET_NAME="d2000_freertos"
# end of Project Configuration
#
@@ -15,22 +13,21 @@ CONFIG_USE_FREERTOS=y
#
# Arch Configuration
#
-CONFIG_TARGET_ARMV8_AARCH32=y
-# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
# CONFIG_TARGET_ARMV7 is not set
CONFIG_USE_CACHE=y
CONFIG_USE_L3CACHE=y
CONFIG_USE_MMU=y
-CONFIG_USE_SYS_TICK=y
-CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# CONFIG_USE_SYS_TICK is not set
# end of Arch Configuration
#
# Board Configuration
#
-CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_F2000_4 is not set
# CONFIG_TARGET_E2000 is not set
-# CONFIG_TARGET_D2000 is not set
+CONFIG_TARGET_D2000=y
# end of Board Configuration
#
@@ -39,7 +36,7 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
CONFIG_USE_SERIAL=y
#
@@ -55,15 +52,10 @@ CONFIG_USE_ETH=y
#
# Eth Configuration
#
-# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
-
-#
-# F_GMAC Configuration
-#
-# CONFIG_F_GMAC_PHY_COMMON is not set
-CONFIG_F_GMAC_PHY_AR803X=y
-# end of F_GMAC 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
@@ -73,20 +65,23 @@ CONFIG_F_GMAC_PHY_AR803X=y
# 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
# end of Components Configuration
-CONFIG_USE_LIBC=y
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
# end of Standalone Setting
#
# Building Option
#
-CONFIG_ENVI_UBUNTU_20_04=y
#
# Cross-Compiler Setting
#
CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
# CONFIG_USE_EXT_COMPILER is not set
# end of Cross-Compiler Setting
@@ -98,10 +93,10 @@ CONFIG_LOG_INFO=y
# CONFIG_LOG_NONE is not set
#
-# GNU Linker Setting
+# Linker Options
#
-CONFIG_AARCH32_RAM_LD=y
-# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_LINK_SCRIPT_ROM=y
CONFIG_ROM_START_UP_ADDR=0x80100000
@@ -109,9 +104,9 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
+CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x100000
-# end of GNU Linker Setting
+# end of Linker Options
# end of Building Option
#
@@ -128,11 +123,5 @@ CONFIG_FREERTOS_USE_UART=y
#
# FreeRTOS Setting
#
-#CONFIG_USE_LWIP=y
-
-#
-# LWIP Configuration
-#
-#CONFIG_LWIP_F_GMAC=y
-# end of LWIP Configuration
+# CONFIG_USE_LWIP is not set
# end of FreeRTOS Setting
diff --git a/example/function_test/sdkconfig.h b/example/function_test/sdkconfig.h
index 179f0caef381934ba8bccccfb3858c2cd8693a37..b789a4f85f52714ef88bd191135d2a35a8f35240 100644
--- a/example/function_test/sdkconfig.h
+++ b/example/function_test/sdkconfig.h
@@ -3,9 +3,7 @@
/* Project Configuration */
-#define CONFIG_TARGET_NAME "ft2004_freertos"
-/*CONFIG_LWIP_POLL_TEST=y */
-/* CONFIG_LWIP_INTRRUPT_TEST is not set */
+#define CONFIG_TARGET_NAME "d2000_freertos"
/* end of Project Configuration */
/* Standalone Setting */
@@ -14,21 +12,20 @@
/* Arch Configuration */
-#define CONFIG_TARGET_ARMV8_AARCH32
-/* CONFIG_TARGET_ARMV8_AARCH64 is not set */
+/* CONFIG_TARGET_ARMV8_AARCH32 is not set */
+#define CONFIG_TARGET_ARMV8_AARCH64
/* CONFIG_TARGET_ARMV7 is not set */
#define CONFIG_USE_CACHE
#define CONFIG_USE_L3CACHE
#define CONFIG_USE_MMU
-#define CONFIG_USE_SYS_TICK
-#define CONFIG_USE_AARCH64_L1_TO_AARCH32
+/* CONFIG_USE_SYS_TICK is not set */
/* end of Arch Configuration */
/* Board Configuration */
-#define CONFIG_TARGET_F2000_4
+/* CONFIG_TARGET_F2000_4 is not set */
/* CONFIG_TARGET_E2000 is not set */
-/* CONFIG_TARGET_D2000 is not set */
+#define CONFIG_TARGET_D2000
/* end of Board Configuration */
/* Components Configuration */
@@ -36,7 +33,7 @@
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#define CONFIG_USE_GIC
-#define CONFIG_EBABLE_GICV3
+#define CONFIG_ENABLE_GICV3
#define CONFIG_USE_SERIAL
/* Usart Configuration */
@@ -49,14 +46,10 @@
/* Eth Configuration */
-/* CONFIG_ENABLE_F_XMAC is not set */
-#define CONFIG_ENABLE_F_GMAC
-
-/* F_GMAC Configuration */
-
-/* CONFIG_F_GMAC_PHY_COMMON is not set */
-#define CONFIG_F_GMAC_PHY_AR803X
-/* end of F_GMAC Configuration */
+/* CONFIG_ENABLE_FXMAC is not set */
+#define CONFIG_ENABLE_FGMAC
+#define CONFIG_FGMAC_PHY_COMMON
+/* CONFIG_FGMAC_PHY_AR803X is not set */
/* end of Eth Configuration */
/* CONFIG_USE_CAN is not set */
/* CONFIG_USE_I2C is not set */
@@ -65,17 +58,19 @@
/* 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 */
/* end of Components Configuration */
-#define CONFIG_USE_LIBC
+#define CONFIG_USE_G_LIBC
+/* CONFIG_USE_NEW_LIBC is not set */
/* end of Standalone Setting */
/* Building Option */
-#define CONFIG_ENVI_UBUNTU_20_04
-
/* Cross-Compiler Setting */
#define CONFIG_COMPILER_NO_STD_STARUP
+#define CONFIG_GCC_OPTIMIZE_LEVEL 0
/* CONFIG_USE_EXT_COMPILER is not set */
/* end of Cross-Compiler Setting */
/* CONFIG_LOG_VERBOS is not set */
@@ -85,10 +80,10 @@
/* CONFIG_LOG_ERROR is not set */
/* CONFIG_LOG_NONE is not set */
-/* GNU Linker Setting */
+/* Linker Options */
-#define CONFIG_AARCH32_RAM_LD
-/* CONFIG_AARCH64_RAM_LD is not set */
+/* CONFIG_AARCH32_RAM_LD is not set */
+#define CONFIG_AARCH64_RAM_LD
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_LINK_SCRIPT_ROM
#define CONFIG_ROM_START_UP_ADDR 0x80100000
@@ -96,9 +91,9 @@
#define CONFIG_LINK_SCRIPT_RAM
#define CONFIG_RAM_START_UP_ADDR 0x81000000
#define CONFIG_RAM_SIZE_MB 64
-#define CONFIG_HEAP_SIZE 0x100000
-#define CONFIG_STACK_SIZE 0x100000
-/* end of GNU Linker Setting */
+#define CONFIG_HEAP_SIZE 1
+#define CONFIG_STACK_SIZE 0x400
+/* end of Linker Options */
/* end of Building Option */
/* Component Configuration */
@@ -111,12 +106,7 @@
/* FreeRTOS Setting */
-/*CONFIG_USE_LWIP=y */
-
-/* LWIP Configuration */
-
-/*CONFIG_LWIP_F_GMAC=y */
-/* end of LWIP Configuration */
+/* CONFIG_USE_LWIP is not set */
/* end of FreeRTOS Setting */
#endif
diff --git a/example/function_test/src/test_uart.c b/example/function_test/src/test_uart.c
index 5fd9715ff6ad02bd651f5c2380c0e3abbe0e67fe..d1ab31d9a7c76165793f9959f061d557a642995f 100644
--- a/example/function_test/src/test_uart.c
+++ b/example/function_test/src/test_uart.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0.
*
* @Date: 2021-07-05 13:48:25
- * @LastEditTime: 2021-07-22 09:48:23
+ * @LastEditTime: 2021-12-15 15:58:22
* @Description: This files is for
*
* @Modify History:
@@ -13,21 +13,21 @@
*/
#include
#include "ft_types.h"
-#include "pl011_uart.h"
+#include "fpl011.h"
#include "gicv3.h"
#include "interrupt.h"
-static Pl011 pl011_obj;
+static FPl011 pl011_obj;
void Uart1Init(void)
{
- Pl011Config config = *Pl011LookupConfig(1);
- printf("config addr: 0x%x \r\n", config.base_address);
- Pl011CfgInitialize(&pl011_obj, &config);
- Pl011SetOptions(&pl011_obj, FUART_OPTION_UARTEN | FUART_OPTION_RXEN | FUART_OPTION_TXEN | FUART_OPTION_FIFOEN);
+ FPl011Config *config = (FPl011Config *)FPl011LookupConfig(1);
+ printf("config addr: 0x%x \r\n", config->base_address);
+ FPl011CfgInitialize(&pl011_obj, config);
+ FPl011SetOptions(&pl011_obj, FPL011_OPTION_UARTEN | FPL011_OPTION_RXEN | FPL011_OPTION_TXEN | FPL011_OPTION_FIFOEN);
}
u8 BlockReceive()
{
- return Pl011BlockReceive(&pl011_obj);
+ return FPl011BlockReceive(&pl011_obj);
}
\ No newline at end of file
diff --git a/example/hello_world/configs/d2000_aarch32_eg_configs b/example/hello_world/configs/d2000_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..e509730045117e53767767c33e1974c35b4e4aa9
--- /dev/null
+++ b/example/hello_world/configs/d2000_aarch32_eg_configs
@@ -0,0 +1,131 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/hello_world/configs/d2000_aarch64_eg_configs b/example/hello_world/configs/d2000_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..49b6b8cf5da8d655bda1979bf28255c1cf822988
--- /dev/null
+++ b/example/hello_world/configs/d2000_aarch64_eg_configs
@@ -0,0 +1,125 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/hello_world/configs/ft2004_aarch32_eg_configs b/example/hello_world/configs/ft2004_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..e66146c79951e75ee5ae3953def992ab54f276d2
--- /dev/null
+++ b/example/hello_world/configs/ft2004_aarch32_eg_configs
@@ -0,0 +1,138 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/hello_world/configs/ft2004_aarch64_eg_configs b/example/hello_world/configs/ft2004_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..827547a4db079b5b94fbc389c842dd1eee9bddb2
--- /dev/null
+++ b/example/hello_world/configs/ft2004_aarch64_eg_configs
@@ -0,0 +1,132 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/hello_world/sdkconfig b/example/hello_world/sdkconfig
index bf666aa6a42ab9dcb5e025bc64b7b55ef398c817..8180c819b3bb86ff8b85ca8aa1218ef2d8c1d9cf 100644
--- a/example/hello_world/sdkconfig
+++ b/example/hello_world/sdkconfig
@@ -2,9 +2,12 @@
#
# Project Configuration
#
-CONFIG_TARGET_NAME="ft2004_freertos"
-#CONFIG_LWIP_POLL_TEST=y
-# CONFIG_LWIP_INTRRUPT_TEST is not set
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
# end of Project Configuration
#
@@ -15,22 +18,21 @@ CONFIG_USE_FREERTOS=y
#
# Arch Configuration
#
-CONFIG_TARGET_ARMV8_AARCH32=y
-# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
# CONFIG_TARGET_ARMV7 is not set
CONFIG_USE_CACHE=y
CONFIG_USE_L3CACHE=y
CONFIG_USE_MMU=y
-CONFIG_USE_SYS_TICK=y
-CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# CONFIG_USE_SYS_TICK is not set
# end of Arch Configuration
#
# Board Configuration
#
-CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_F2000_4 is not set
# CONFIG_TARGET_E2000 is not set
-# CONFIG_TARGET_D2000 is not set
+CONFIG_TARGET_D2000=y
# end of Board Configuration
#
@@ -39,15 +41,8 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
-CONFIG_USE_SERIAL=y
-
-#
-# Usart Configuration
-#
-CONFIG_ENABLE_Pl011_UART=y
-# end of Usart Configuration
-
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
# CONFIG_USE_GPIO is not set
# CONFIG_USE_IOMUX is not set
CONFIG_USE_ETH=y
@@ -55,15 +50,10 @@ CONFIG_USE_ETH=y
#
# Eth Configuration
#
-# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
-
-#
-# F_GMAC Configuration
-#
-# CONFIG_F_GMAC_PHY_COMMON is not set
-CONFIG_F_GMAC_PHY_AR803X=y
-# end of F_GMAC 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
@@ -73,20 +63,23 @@ CONFIG_F_GMAC_PHY_AR803X=y
# 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
# end of Components Configuration
-CONFIG_USE_LIBC=y
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
# end of Standalone Setting
#
# Building Option
#
-CONFIG_ENVI_UBUNTU_20_04=y
#
# Cross-Compiler Setting
#
CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
# CONFIG_USE_EXT_COMPILER is not set
# end of Cross-Compiler Setting
@@ -98,10 +91,10 @@ CONFIG_LOG_INFO=y
# CONFIG_LOG_NONE is not set
#
-# GNU Linker Setting
+# Linker Options
#
-CONFIG_AARCH32_RAM_LD=y
-# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_LINK_SCRIPT_ROM=y
CONFIG_ROM_START_UP_ADDR=0x80100000
@@ -109,9 +102,9 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
-CONFIG_STACK_SIZE=0x100000
-# end of GNU Linker Setting
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x400
+# end of Linker Options
# end of Building Option
#
@@ -128,11 +121,5 @@ CONFIG_FREERTOS_USE_UART=y
#
# FreeRTOS Setting
#
-#CONFIG_USE_LWIP=y
-
-#
-# LWIP Configuration
-#
-#CONFIG_LWIP_F_GMAC=y
-# end of LWIP Configuration
+# CONFIG_USE_LWIP is not set
# end of FreeRTOS Setting
diff --git a/example/hello_world/sdkconfig.h b/example/hello_world/sdkconfig.h
index 179f0caef381934ba8bccccfb3858c2cd8693a37..42217ca25543ce67614199716660bf00b8aafbe2 100644
--- a/example/hello_world/sdkconfig.h
+++ b/example/hello_world/sdkconfig.h
@@ -3,9 +3,10 @@
/* Project Configuration */
-#define CONFIG_TARGET_NAME "ft2004_freertos"
-/*CONFIG_LWIP_POLL_TEST=y */
-/* CONFIG_LWIP_INTRRUPT_TEST is not set */
+/* FT2000-4 AARCH32 FreeRTOS Configuration */
+
+#define CONFIG_TARGET_NAME "d2000_freertos"
+/* end of FT2000-4 AARCH32 FreeRTOS Configuration */
/* end of Project Configuration */
/* Standalone Setting */
@@ -14,21 +15,20 @@
/* Arch Configuration */
-#define CONFIG_TARGET_ARMV8_AARCH32
-/* CONFIG_TARGET_ARMV8_AARCH64 is not set */
+/* CONFIG_TARGET_ARMV8_AARCH32 is not set */
+#define CONFIG_TARGET_ARMV8_AARCH64
/* CONFIG_TARGET_ARMV7 is not set */
#define CONFIG_USE_CACHE
#define CONFIG_USE_L3CACHE
#define CONFIG_USE_MMU
-#define CONFIG_USE_SYS_TICK
-#define CONFIG_USE_AARCH64_L1_TO_AARCH32
+/* CONFIG_USE_SYS_TICK is not set */
/* end of Arch Configuration */
/* Board Configuration */
-#define CONFIG_TARGET_F2000_4
+/* CONFIG_TARGET_F2000_4 is not set */
/* CONFIG_TARGET_E2000 is not set */
-/* CONFIG_TARGET_D2000 is not set */
+#define CONFIG_TARGET_D2000
/* end of Board Configuration */
/* Components Configuration */
@@ -36,27 +36,18 @@
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#define CONFIG_USE_GIC
-#define CONFIG_EBABLE_GICV3
-#define CONFIG_USE_SERIAL
-
-/* Usart Configuration */
-
-#define CONFIG_ENABLE_Pl011_UART
-/* end of Usart Configuration */
+#define CONFIG_ENABLE_GICV3
+/* CONFIG_USE_SERIAL is not set */
/* CONFIG_USE_GPIO is not set */
/* CONFIG_USE_IOMUX is not set */
#define CONFIG_USE_ETH
/* Eth Configuration */
-/* CONFIG_ENABLE_F_XMAC is not set */
-#define CONFIG_ENABLE_F_GMAC
-
-/* F_GMAC Configuration */
-
-/* CONFIG_F_GMAC_PHY_COMMON is not set */
-#define CONFIG_F_GMAC_PHY_AR803X
-/* end of F_GMAC Configuration */
+/* CONFIG_ENABLE_FXMAC is not set */
+#define CONFIG_ENABLE_FGMAC
+#define CONFIG_FGMAC_PHY_COMMON
+/* CONFIG_FGMAC_PHY_AR803X is not set */
/* end of Eth Configuration */
/* CONFIG_USE_CAN is not set */
/* CONFIG_USE_I2C is not set */
@@ -65,17 +56,19 @@
/* 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 */
/* end of Components Configuration */
-#define CONFIG_USE_LIBC
+#define CONFIG_USE_G_LIBC
+/* CONFIG_USE_NEW_LIBC is not set */
/* end of Standalone Setting */
/* Building Option */
-#define CONFIG_ENVI_UBUNTU_20_04
-
/* Cross-Compiler Setting */
#define CONFIG_COMPILER_NO_STD_STARUP
+#define CONFIG_GCC_OPTIMIZE_LEVEL 0
/* CONFIG_USE_EXT_COMPILER is not set */
/* end of Cross-Compiler Setting */
/* CONFIG_LOG_VERBOS is not set */
@@ -85,10 +78,10 @@
/* CONFIG_LOG_ERROR is not set */
/* CONFIG_LOG_NONE is not set */
-/* GNU Linker Setting */
+/* Linker Options */
-#define CONFIG_AARCH32_RAM_LD
-/* CONFIG_AARCH64_RAM_LD is not set */
+/* CONFIG_AARCH32_RAM_LD is not set */
+#define CONFIG_AARCH64_RAM_LD
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_LINK_SCRIPT_ROM
#define CONFIG_ROM_START_UP_ADDR 0x80100000
@@ -96,9 +89,9 @@
#define CONFIG_LINK_SCRIPT_RAM
#define CONFIG_RAM_START_UP_ADDR 0x81000000
#define CONFIG_RAM_SIZE_MB 64
-#define CONFIG_HEAP_SIZE 0x100000
-#define CONFIG_STACK_SIZE 0x100000
-/* end of GNU Linker Setting */
+#define CONFIG_HEAP_SIZE 1
+#define CONFIG_STACK_SIZE 0x400
+/* end of Linker Options */
/* end of Building Option */
/* Component Configuration */
@@ -111,12 +104,7 @@
/* FreeRTOS Setting */
-/*CONFIG_USE_LWIP=y */
-
-/* LWIP Configuration */
-
-/*CONFIG_LWIP_F_GMAC=y */
-/* end of LWIP Configuration */
+/* CONFIG_USE_LWIP is not set */
/* end of FreeRTOS Setting */
#endif
diff --git a/example/lwip_test/README.md b/example/lwip_test/README.md
index 745924a93445bdd7b959d1cb4d7af70875050259..8705d69bb4fc7fcfdbf93bbc004b8a59aa93f454 100644
--- a/example/lwip_test/README.md
+++ b/example/lwip_test/README.md
@@ -46,20 +46,46 @@
- Use LWIP
+本例子已经提供好具体的编译指令,以下进行介绍:
+- make 将目录下的工程进行编译
+- make clean 将目录下的工程进行清理
+- make boot 将目录下的工程进行编译,并将生成的elf 复制到目标地址
+- make load_d2000_aarch64 将预设64bit d2000 下的配置加载至工程中
+- make load_d2000_aarch32 将预设32bit d2000 下的配置加载至工程中
+- make load_ft2004_aarch64 将预设64bit ft2004 下的配置加载至工程中
+- make load_ft2004_aarch32 将预设32bit ft2004 下的配置加载至工程中
+- make menuconfig 配置目录下的参数变量
+- make backup_kconfig 将目录下的sdkconfig 备份到./configs下
+
+具体使用方法为:
+- 在当前目录下
+- 执行以上指令
+
### 2.3 构建和下载
#### 2.3.1 构建过程
- 在host侧完成配置
->配置成D2000,对于其它平台,使用对于的默认配置,如FT2000-4 `make config_ft2004_configs`
+>配置成ft2004,对于其它平台,使用对于的默认配置,如D2000 `make load_d2000_aarch32`
+
+- 选择目标平台
+```
+make load_ft2004_aarch32
+```
+
+- 选择例程需要的配置
+```
+make menuconfig
+```
+
+- 进行编译
```
-$ make config_d2000_configs
-$ make menuconfig
+make
```
-- 在host侧完成构建
+- 将编译出的镜像放置到tftp目录下
```
-$ make
+make boot
```
#### 2.3.2 下载过程
diff --git a/example/lwip_test/configs/d2000_aarch32_eg_configs b/example/lwip_test/configs/d2000_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..66efcb4e3e6c2c91aff73b5fa2e3c70c7ed987c0
--- /dev/null
+++ b/example/lwip_test/configs/d2000_aarch32_eg_configs
@@ -0,0 +1,134 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+CONFIG_USE_LWIP=y
+
+#
+# LWIP Configuration
+#
+CONFIG_LWIP_F_GMAC=y
+# end of LWIP Configuration
+# end of FreeRTOS Setting
diff --git a/example/lwip_test/configs/d2000_aarch64_eg_configs b/example/lwip_test/configs/d2000_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..2f0570a80213e08cce9c1d1357d0f7cbafd2cf4c
--- /dev/null
+++ b/example/lwip_test/configs/d2000_aarch64_eg_configs
@@ -0,0 +1,128 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+CONFIG_USE_LWIP=y
+
+#
+# LWIP Configuration
+#
+CONFIG_LWIP_F_GMAC=y
+# end of LWIP Configuration
+# end of FreeRTOS Setting
diff --git a/example/lwip_test/configs/ft2004_aarch32_eg_configs b/example/lwip_test/configs/ft2004_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..a7827f8239b8021b9c3b7fc0b928573b3b0c104f
--- /dev/null
+++ b/example/lwip_test/configs/ft2004_aarch32_eg_configs
@@ -0,0 +1,141 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+# CONFIG_LOG_INFO is not set
+CONFIG_LOG_WARN=y
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+CONFIG_USE_LWIP=y
+
+#
+# LWIP Configuration
+#
+CONFIG_LWIP_F_GMAC=y
+# end of LWIP Configuration
+# end of FreeRTOS Setting
diff --git a/example/lwip_test/configs/ft2004_aarch64_eg_configs b/example/lwip_test/configs/ft2004_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..02db22b66022cd81c06ab98656a4ae66ff8d26e6
--- /dev/null
+++ b/example/lwip_test/configs/ft2004_aarch64_eg_configs
@@ -0,0 +1,135 @@
+
+#
+# Project Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+CONFIG_LWIP_POLL_TEST=y
+# CONFIG_LWIP_INTRRUPT_TEST is not set
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+# CONFIG_LOG_INFO is not set
+CONFIG_LOG_WARN=y
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+CONFIG_USE_LWIP=y
+
+#
+# LWIP Configuration
+#
+CONFIG_LWIP_F_GMAC=y
+# end of LWIP Configuration
+# end of FreeRTOS Setting
diff --git a/example/lwip_test/sdkconfig b/example/lwip_test/sdkconfig
index fdd0967c51b27a1161fd88c8f09e025e54979e43..2f0570a80213e08cce9c1d1357d0f7cbafd2cf4c 100644
--- a/example/lwip_test/sdkconfig
+++ b/example/lwip_test/sdkconfig
@@ -2,7 +2,7 @@
#
# Project Configuration
#
-CONFIG_TARGET_NAME="ft2004_freertos"
+CONFIG_TARGET_NAME="d2000_freertos"
CONFIG_LWIP_POLL_TEST=y
# CONFIG_LWIP_INTRRUPT_TEST is not set
# end of Project Configuration
@@ -27,9 +27,9 @@ CONFIG_USE_SYS_TICK=y
#
# Board Configuration
#
-CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_F2000_4 is not set
# CONFIG_TARGET_E2000 is not set
-# CONFIG_TARGET_D2000 is not set
+CONFIG_TARGET_D2000=y
# end of Board Configuration
#
@@ -38,15 +38,8 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
-CONFIG_USE_SERIAL=y
-
-#
-# Usart Configuration
-#
-CONFIG_ENABLE_Pl011_UART=y
-# end of Usart Configuration
-
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
# CONFIG_USE_GPIO is not set
# CONFIG_USE_IOMUX is not set
CONFIG_USE_ETH=y
@@ -54,15 +47,10 @@ CONFIG_USE_ETH=y
#
# Eth Configuration
#
-# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
-
-#
-# F_GMAC Configuration
-#
-# CONFIG_F_GMAC_PHY_COMMON is not set
-CONFIG_F_GMAC_PHY_AR803X=y
-# end of F_GMAC 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
@@ -73,6 +61,7 @@ CONFIG_F_GMAC_PHY_AR803X=y
# CONFIG_USE_WDT is not set
# CONFIG_USE_DMA is not set
# CONFIG_USE_NAND is not set
+# CONFIG_USE_RTC is not set
# end of Components Configuration
CONFIG_USE_G_LIBC=y
@@ -87,6 +76,7 @@ CONFIG_USE_G_LIBC=y
# Cross-Compiler Setting
#
CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
# CONFIG_USE_EXT_COMPILER is not set
# end of Cross-Compiler Setting
@@ -102,7 +92,6 @@ CONFIG_LOG_INFO=y
#
# CONFIG_AARCH32_RAM_LD is not set
CONFIG_AARCH64_RAM_LD=y
-# CONFIG_QEMU_AARCH32_RAM_LD is not set
# CONFIG_USER_DEFINED_LD is not set
CONFIG_LINK_SCRIPT_ROM=y
CONFIG_ROM_START_UP_ADDR=0x80100000
@@ -110,8 +99,8 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
-CONFIG_STACK_TOP_ADDR=0x82000000
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
# end of Linker Options
# end of Building Option
diff --git a/example/lwip_test/sdkconfig.h b/example/lwip_test/sdkconfig.h
index df7a5732aa8ebf803ccda3bf4aa58326a01c795a..31ff1a56b16de8ba74a009fd664172513b7d146a 100644
--- a/example/lwip_test/sdkconfig.h
+++ b/example/lwip_test/sdkconfig.h
@@ -3,7 +3,7 @@
/* Project Configuration */
-#define CONFIG_TARGET_NAME "ft2004_freertos"
+#define CONFIG_TARGET_NAME "d2000_freertos"
#define CONFIG_LWIP_POLL_TEST
/* CONFIG_LWIP_INTRRUPT_TEST is not set */
/* end of Project Configuration */
@@ -25,9 +25,9 @@
/* Board Configuration */
-#define CONFIG_TARGET_F2000_4
+/* CONFIG_TARGET_F2000_4 is not set */
/* CONFIG_TARGET_E2000 is not set */
-/* CONFIG_TARGET_D2000 is not set */
+#define CONFIG_TARGET_D2000
/* end of Board Configuration */
/* Components Configuration */
@@ -35,27 +35,18 @@
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#define CONFIG_USE_GIC
-#define CONFIG_EBABLE_GICV3
-#define CONFIG_USE_SERIAL
-
-/* Usart Configuration */
-
-#define CONFIG_ENABLE_Pl011_UART
-/* end of Usart Configuration */
+#define CONFIG_ENABLE_GICV3
+/* CONFIG_USE_SERIAL is not set */
/* CONFIG_USE_GPIO is not set */
/* CONFIG_USE_IOMUX is not set */
#define CONFIG_USE_ETH
/* Eth Configuration */
-/* CONFIG_ENABLE_F_XMAC is not set */
-#define CONFIG_ENABLE_F_GMAC
-
-/* F_GMAC Configuration */
-
-/* CONFIG_F_GMAC_PHY_COMMON is not set */
-#define CONFIG_F_GMAC_PHY_AR803X
-/* end of F_GMAC Configuration */
+/* CONFIG_ENABLE_FXMAC is not set */
+#define CONFIG_ENABLE_FGMAC
+#define CONFIG_FGMAC_PHY_COMMON
+/* CONFIG_FGMAC_PHY_AR803X is not set */
/* end of Eth Configuration */
/* CONFIG_USE_CAN is not set */
/* CONFIG_USE_I2C is not set */
@@ -65,6 +56,7 @@
/* CONFIG_USE_WDT is not set */
/* CONFIG_USE_DMA is not set */
/* CONFIG_USE_NAND is not set */
+/* CONFIG_USE_RTC is not set */
/* end of Components Configuration */
#define CONFIG_USE_G_LIBC
/* CONFIG_USE_NEW_LIBC is not set */
@@ -75,6 +67,7 @@
/* Cross-Compiler Setting */
#define CONFIG_COMPILER_NO_STD_STARUP
+#define CONFIG_GCC_OPTIMIZE_LEVEL 0
/* CONFIG_USE_EXT_COMPILER is not set */
/* end of Cross-Compiler Setting */
/* CONFIG_LOG_VERBOS is not set */
@@ -88,7 +81,6 @@
/* CONFIG_AARCH32_RAM_LD is not set */
#define CONFIG_AARCH64_RAM_LD
-/* CONFIG_QEMU_AARCH32_RAM_LD is not set */
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_LINK_SCRIPT_ROM
#define CONFIG_ROM_START_UP_ADDR 0x80100000
@@ -96,8 +88,8 @@
#define CONFIG_LINK_SCRIPT_RAM
#define CONFIG_RAM_START_UP_ADDR 0x81000000
#define CONFIG_RAM_SIZE_MB 64
-#define CONFIG_HEAP_SIZE 0x100000
-#define CONFIG_STACK_TOP_ADDR 0x82000000
+#define CONFIG_HEAP_SIZE 1
+#define CONFIG_STACK_SIZE 0x400
/* end of Linker Options */
/* end of Building Option */
diff --git a/example/lwip_test/test_lwip.c b/example/lwip_test/test_lwip.c
index eb495493d508f23ca3081c0d41a270332aedb75b..a9f75863c32e9dc5b9717cdf972bf9f2103e6cec 100644
--- a/example/lwip_test/test_lwip.c
+++ b/example/lwip_test/test_lwip.c
@@ -22,11 +22,11 @@
#error "Please include sdkconfig.h first"
#endif
-#ifndef CONFIG_ENABLE_F_GMAC
+#ifndef CONFIG_ENABLE_FGMAC
#error "Please include component f_gmac first"
#endif
-#include "gmac.h"
+#include "fgmac.h"
#include "lwip/ip4_addr.h"
#include "lwip/init.h"
#include "netif/ethernet.h"
@@ -55,7 +55,7 @@
struct ethernetif {
struct eth_addr *ethaddr;
- GmacCtrl *ethctrl;
+ FGmac *ethctrl;
};
static ip4_addr_t ip_addr, net_mask, gate_way;
diff --git a/example/start_up/configs/d2000_aarch32_eg_configs b/example/start_up/configs/d2000_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..8e72dd207f963c37522994149280cca2f40bfc73
--- /dev/null
+++ b/example/start_up/configs/d2000_aarch32_eg_configs
@@ -0,0 +1,142 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# CONFIG_DEMO_HELLO_WORLD is not set
+# CONFIG_DEMO_GET_CPU_STATS is not set
+CONFIG_DEMO_MSG_QUEUE=y
+# CONFIG_DEMO_SEMAPHORE is not set
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/start_up/configs/d2000_aarch64_eg_configs b/example/start_up/configs/d2000_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..1ac5110c8f667dd1782a526663e2188cb0a41f01
--- /dev/null
+++ b/example/start_up/configs/d2000_aarch64_eg_configs
@@ -0,0 +1,136 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# CONFIG_DEMO_HELLO_WORLD is not set
+# CONFIG_DEMO_GET_CPU_STATS is not set
+CONFIG_DEMO_MSG_QUEUE=y
+# CONFIG_DEMO_SEMAPHORE is not set
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/start_up/configs/ft2004_aarch32_eg_configs b/example/start_up/configs/ft2004_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..861b811d2a6576d7f2c6d16be609b40f3b9bc036
--- /dev/null
+++ b/example/start_up/configs/ft2004_aarch32_eg_configs
@@ -0,0 +1,142 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# CONFIG_DEMO_HELLO_WORLD is not set
+# CONFIG_DEMO_GET_CPU_STATS is not set
+CONFIG_DEMO_MSG_QUEUE=y
+# CONFIG_DEMO_SEMAPHORE is not set
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/start_up/configs/ft2004_aarch64_eg_configs b/example/start_up/configs/ft2004_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..f22d58d79f32fe745f9a4b141d2f9605315df458
--- /dev/null
+++ b/example/start_up/configs/ft2004_aarch64_eg_configs
@@ -0,0 +1,136 @@
+
+#
+# Project Configuration
+#
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# CONFIG_DEMO_HELLO_WORLD is not set
+# CONFIG_DEMO_GET_CPU_STATS is not set
+CONFIG_DEMO_MSG_QUEUE=y
+# CONFIG_DEMO_SEMAPHORE is not set
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/start_up/sdkconfig b/example/start_up/sdkconfig
index bf666aa6a42ab9dcb5e025bc64b7b55ef398c817..b249eaa1a68368c54ca1d35d77cf04ccca501d8f 100644
--- a/example/start_up/sdkconfig
+++ b/example/start_up/sdkconfig
@@ -2,9 +2,16 @@
#
# Project Configuration
#
-CONFIG_TARGET_NAME="ft2004_freertos"
-#CONFIG_LWIP_POLL_TEST=y
-# CONFIG_LWIP_INTRRUPT_TEST is not set
+
+#
+# FT2000-4 AARCH32 FreeRTOS Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# CONFIG_DEMO_HELLO_WORLD is not set
+# CONFIG_DEMO_GET_CPU_STATS is not set
+CONFIG_DEMO_MSG_QUEUE=y
+# CONFIG_DEMO_SEMAPHORE is not set
+# end of FT2000-4 AARCH32 FreeRTOS Configuration
# end of Project Configuration
#
@@ -15,22 +22,21 @@ CONFIG_USE_FREERTOS=y
#
# Arch Configuration
#
-CONFIG_TARGET_ARMV8_AARCH32=y
-# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
# CONFIG_TARGET_ARMV7 is not set
CONFIG_USE_CACHE=y
CONFIG_USE_L3CACHE=y
CONFIG_USE_MMU=y
-CONFIG_USE_SYS_TICK=y
-CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# CONFIG_USE_SYS_TICK is not set
# end of Arch Configuration
#
# Board Configuration
#
-CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_F2000_4 is not set
# CONFIG_TARGET_E2000 is not set
-# CONFIG_TARGET_D2000 is not set
+CONFIG_TARGET_D2000=y
# end of Board Configuration
#
@@ -39,7 +45,7 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
+CONFIG_ENABLE_GICV3=y
CONFIG_USE_SERIAL=y
#
@@ -55,15 +61,10 @@ CONFIG_USE_ETH=y
#
# Eth Configuration
#
-# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
-
-#
-# F_GMAC Configuration
-#
-# CONFIG_F_GMAC_PHY_COMMON is not set
-CONFIG_F_GMAC_PHY_AR803X=y
-# end of F_GMAC 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
@@ -73,20 +74,23 @@ CONFIG_F_GMAC_PHY_AR803X=y
# 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
# end of Components Configuration
-CONFIG_USE_LIBC=y
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
# end of Standalone Setting
#
# Building Option
#
-CONFIG_ENVI_UBUNTU_20_04=y
#
# Cross-Compiler Setting
#
CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
# CONFIG_USE_EXT_COMPILER is not set
# end of Cross-Compiler Setting
@@ -98,10 +102,10 @@ CONFIG_LOG_INFO=y
# CONFIG_LOG_NONE is not set
#
-# GNU Linker Setting
+# Linker Options
#
-CONFIG_AARCH32_RAM_LD=y
-# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_LINK_SCRIPT_ROM=y
CONFIG_ROM_START_UP_ADDR=0x80100000
@@ -109,9 +113,9 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
-CONFIG_STACK_SIZE=0x100000
-# end of GNU Linker Setting
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x400
+# end of Linker Options
# end of Building Option
#
@@ -128,11 +132,5 @@ CONFIG_FREERTOS_USE_UART=y
#
# FreeRTOS Setting
#
-#CONFIG_USE_LWIP=y
-
-#
-# LWIP Configuration
-#
-#CONFIG_LWIP_F_GMAC=y
-# end of LWIP Configuration
+# CONFIG_USE_LWIP is not set
# end of FreeRTOS Setting
diff --git a/example/start_up/sdkconfig.h b/example/start_up/sdkconfig.h
index 179f0caef381934ba8bccccfb3858c2cd8693a37..ea5cb17aa772651670c701cf4e484c981846d79f 100644
--- a/example/start_up/sdkconfig.h
+++ b/example/start_up/sdkconfig.h
@@ -3,9 +3,14 @@
/* Project Configuration */
-#define CONFIG_TARGET_NAME "ft2004_freertos"
-/*CONFIG_LWIP_POLL_TEST=y */
-/* CONFIG_LWIP_INTRRUPT_TEST is not set */
+/* FT2000-4 AARCH32 FreeRTOS Configuration */
+
+#define CONFIG_TARGET_NAME "d2000_freertos"
+/* CONFIG_DEMO_HELLO_WORLD is not set */
+/* CONFIG_DEMO_GET_CPU_STATS is not set */
+#define CONFIG_DEMO_MSG_QUEUE
+/* CONFIG_DEMO_SEMAPHORE is not set */
+/* end of FT2000-4 AARCH32 FreeRTOS Configuration */
/* end of Project Configuration */
/* Standalone Setting */
@@ -14,21 +19,20 @@
/* Arch Configuration */
-#define CONFIG_TARGET_ARMV8_AARCH32
-/* CONFIG_TARGET_ARMV8_AARCH64 is not set */
+/* CONFIG_TARGET_ARMV8_AARCH32 is not set */
+#define CONFIG_TARGET_ARMV8_AARCH64
/* CONFIG_TARGET_ARMV7 is not set */
#define CONFIG_USE_CACHE
#define CONFIG_USE_L3CACHE
#define CONFIG_USE_MMU
-#define CONFIG_USE_SYS_TICK
-#define CONFIG_USE_AARCH64_L1_TO_AARCH32
+/* CONFIG_USE_SYS_TICK is not set */
/* end of Arch Configuration */
/* Board Configuration */
-#define CONFIG_TARGET_F2000_4
+/* CONFIG_TARGET_F2000_4 is not set */
/* CONFIG_TARGET_E2000 is not set */
-/* CONFIG_TARGET_D2000 is not set */
+#define CONFIG_TARGET_D2000
/* end of Board Configuration */
/* Components Configuration */
@@ -36,7 +40,7 @@
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#define CONFIG_USE_GIC
-#define CONFIG_EBABLE_GICV3
+#define CONFIG_ENABLE_GICV3
#define CONFIG_USE_SERIAL
/* Usart Configuration */
@@ -49,14 +53,10 @@
/* Eth Configuration */
-/* CONFIG_ENABLE_F_XMAC is not set */
-#define CONFIG_ENABLE_F_GMAC
-
-/* F_GMAC Configuration */
-
-/* CONFIG_F_GMAC_PHY_COMMON is not set */
-#define CONFIG_F_GMAC_PHY_AR803X
-/* end of F_GMAC Configuration */
+/* CONFIG_ENABLE_FXMAC is not set */
+#define CONFIG_ENABLE_FGMAC
+#define CONFIG_FGMAC_PHY_COMMON
+/* CONFIG_FGMAC_PHY_AR803X is not set */
/* end of Eth Configuration */
/* CONFIG_USE_CAN is not set */
/* CONFIG_USE_I2C is not set */
@@ -65,17 +65,19 @@
/* 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 */
/* end of Components Configuration */
-#define CONFIG_USE_LIBC
+#define CONFIG_USE_G_LIBC
+/* CONFIG_USE_NEW_LIBC is not set */
/* end of Standalone Setting */
/* Building Option */
-#define CONFIG_ENVI_UBUNTU_20_04
-
/* Cross-Compiler Setting */
#define CONFIG_COMPILER_NO_STD_STARUP
+#define CONFIG_GCC_OPTIMIZE_LEVEL 0
/* CONFIG_USE_EXT_COMPILER is not set */
/* end of Cross-Compiler Setting */
/* CONFIG_LOG_VERBOS is not set */
@@ -85,10 +87,10 @@
/* CONFIG_LOG_ERROR is not set */
/* CONFIG_LOG_NONE is not set */
-/* GNU Linker Setting */
+/* Linker Options */
-#define CONFIG_AARCH32_RAM_LD
-/* CONFIG_AARCH64_RAM_LD is not set */
+/* CONFIG_AARCH32_RAM_LD is not set */
+#define CONFIG_AARCH64_RAM_LD
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_LINK_SCRIPT_ROM
#define CONFIG_ROM_START_UP_ADDR 0x80100000
@@ -96,9 +98,9 @@
#define CONFIG_LINK_SCRIPT_RAM
#define CONFIG_RAM_START_UP_ADDR 0x81000000
#define CONFIG_RAM_SIZE_MB 64
-#define CONFIG_HEAP_SIZE 0x100000
-#define CONFIG_STACK_SIZE 0x100000
-/* end of GNU Linker Setting */
+#define CONFIG_HEAP_SIZE 1
+#define CONFIG_STACK_SIZE 0x400
+/* end of Linker Options */
/* end of Building Option */
/* Component Configuration */
@@ -111,12 +113,7 @@
/* FreeRTOS Setting */
-/*CONFIG_USE_LWIP=y */
-
-/* LWIP Configuration */
-
-/*CONFIG_LWIP_F_GMAC=y */
-/* end of LWIP Configuration */
+/* CONFIG_USE_LWIP is not set */
/* end of FreeRTOS Setting */
#endif
diff --git a/example/start_up/test_uart.c b/example/start_up/test_uart.c
index 4091994d47e85961727673f4427a2428418e69c3..735a6af6c0136ad52a14db259335259892c5161e 100644
--- a/example/start_up/test_uart.c
+++ b/example/start_up/test_uart.c
@@ -13,21 +13,21 @@
*/
#include
#include "ft_types.h"
-#include "pl011_uart.h"
+#include "fpl011.h"
#include "gicv3.h"
#include "interrupt.h"
-static Pl011 pl011_obj;
+static FPl011 pl011_obj;
void Uart1Init(void)
{
- Pl011Config config = *Pl011LookupConfig(1);
+ FPl011Config config = *FPl011LookupConfig(1);
printf("config addr: 0x%x \r\n", config.base_address);
- Pl011CfgInitialize(&pl011_obj, &config);
- Pl011SetOptions(&pl011_obj, FUART_OPTION_UARTEN | FUART_OPTION_RXEN | FUART_OPTION_TXEN | FUART_OPTION_FIFOEN);
+ FPl011CfgInitialize(&pl011_obj, &config);
+ FPl011SetOptions(&pl011_obj, FPL011_OPTION_UARTEN | FPL011_OPTION_RXEN | FPL011_OPTION_TXEN | FPL011_OPTION_FIFOEN);
}
u8 BlockReceive()
{
- return Pl011BlockReceive(&pl011_obj);
+ return FPl011BlockReceive(&pl011_obj);
}
\ No newline at end of file
diff --git a/example/template/configs/d2000_aarch32_eg_configs b/example/template/configs/d2000_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..a3bdac432e5e71bfeb397ff2867aed542763af0f
--- /dev/null
+++ b/example/template/configs/d2000_aarch32_eg_configs
@@ -0,0 +1,131 @@
+
+#
+# Project Configuration
+#
+
+#
+# Template Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of Template Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/template/configs/d2000_aarch64_eg_configs b/example/template/configs/d2000_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..fde19b6238c503dba780c741ce12ed13eab5332c
--- /dev/null
+++ b/example/template/configs/d2000_aarch64_eg_configs
@@ -0,0 +1,125 @@
+
+#
+# Project Configuration
+#
+
+#
+# Template Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of Template Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+# CONFIG_USE_SYS_TICK is not set
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+# CONFIG_TARGET_F2000_4 is not set
+# CONFIG_TARGET_E2000 is not set
+CONFIG_TARGET_D2000=y
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/template/configs/ft2004_aarch32_eg_configs b/example/template/configs/ft2004_aarch32_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..4f19551765d863d224485712442b57b550ebf333
--- /dev/null
+++ b/example/template/configs/ft2004_aarch32_eg_configs
@@ -0,0 +1,138 @@
+
+#
+# Project Configuration
+#
+
+#
+# Template Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# end of Template Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+CONFIG_TARGET_ARMV8_AARCH32=y
+# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+CONFIG_AARCH32_RAM_LD=y
+# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_SVC_STACK_SIZE=0x1000
+CONFIG_SYS_STACK_SIZE=0x1000
+CONFIG_IRQ_STACK_SIZE=0x1000
+CONFIG_ABORT_STACK_SIZE=0x1000
+CONFIG_FIQ_STACK_SIZE=0x1000
+CONFIG_UNDEF_STACK_SIZE=0x1000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/template/configs/ft2004_aarch64_eg_configs b/example/template/configs/ft2004_aarch64_eg_configs
new file mode 100644
index 0000000000000000000000000000000000000000..57941cf47df6c3bf68ed001d2ef65536c8b4e378
--- /dev/null
+++ b/example/template/configs/ft2004_aarch64_eg_configs
@@ -0,0 +1,132 @@
+
+#
+# Project Configuration
+#
+
+#
+# Template Configuration
+#
+CONFIG_TARGET_NAME="ft2004_freertos"
+# end of Template Configuration
+# end of Project Configuration
+
+#
+# Standalone Setting
+#
+CONFIG_USE_FREERTOS=y
+
+#
+# Arch Configuration
+#
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
+# CONFIG_TARGET_ARMV7 is not set
+CONFIG_USE_CACHE=y
+CONFIG_USE_L3CACHE=y
+CONFIG_USE_MMU=y
+CONFIG_USE_SYS_TICK=y
+# end of Arch Configuration
+
+#
+# Board Configuration
+#
+CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_E2000 is not set
+# CONFIG_TARGET_D2000 is not set
+# end of Board Configuration
+
+#
+# Components Configuration
+#
+# CONFIG_USE_SPI is not set
+# CONFIG_USE_QSPI is not set
+CONFIG_USE_GIC=y
+CONFIG_ENABLE_GICV3=y
+CONFIG_USE_SERIAL=y
+
+#
+# Usart Configuration
+#
+CONFIG_ENABLE_Pl011_UART=y
+# end of Usart Configuration
+
+# CONFIG_USE_GPIO is not set
+# CONFIG_USE_IOMUX 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_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
+# end of Components Configuration
+
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
+# end of Standalone Setting
+
+#
+# Building Option
+#
+
+#
+# Cross-Compiler Setting
+#
+CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
+# CONFIG_USE_EXT_COMPILER is not set
+# end of Cross-Compiler Setting
+
+# CONFIG_LOG_VERBOS is not set
+# CONFIG_LOG_DEBUG is not set
+CONFIG_LOG_INFO=y
+# CONFIG_LOG_WARN is not set
+# CONFIG_LOG_ERROR is not set
+# CONFIG_LOG_NONE is not set
+
+#
+# Linker Options
+#
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
+# CONFIG_USER_DEFINED_LD is not set
+CONFIG_LINK_SCRIPT_ROM=y
+CONFIG_ROM_START_UP_ADDR=0x80100000
+CONFIG_ROM_SIZE_MB=1
+CONFIG_LINK_SCRIPT_RAM=y
+CONFIG_RAM_START_UP_ADDR=0x81000000
+CONFIG_RAM_SIZE_MB=64
+CONFIG_HEAP_SIZE=1
+CONFIG_STACK_SIZE=0x100000
+# end of Linker Options
+# end of Building Option
+
+#
+# Component Configuration
+#
+
+#
+# Freertos Drivers
+#
+CONFIG_FREERTOS_USE_UART=y
+# end of Freertos Drivers
+# end of Component Configuration
+
+#
+# FreeRTOS Setting
+#
+# CONFIG_USE_LWIP is not set
+# end of FreeRTOS Setting
diff --git a/example/template/sdkconfig b/example/template/sdkconfig
index bf666aa6a42ab9dcb5e025bc64b7b55ef398c817..fde19b6238c503dba780c741ce12ed13eab5332c 100644
--- a/example/template/sdkconfig
+++ b/example/template/sdkconfig
@@ -2,9 +2,12 @@
#
# Project Configuration
#
-CONFIG_TARGET_NAME="ft2004_freertos"
-#CONFIG_LWIP_POLL_TEST=y
-# CONFIG_LWIP_INTRRUPT_TEST is not set
+
+#
+# Template Configuration
+#
+CONFIG_TARGET_NAME="d2000_freertos"
+# end of Template Configuration
# end of Project Configuration
#
@@ -15,22 +18,21 @@ CONFIG_USE_FREERTOS=y
#
# Arch Configuration
#
-CONFIG_TARGET_ARMV8_AARCH32=y
-# CONFIG_TARGET_ARMV8_AARCH64 is not set
+# CONFIG_TARGET_ARMV8_AARCH32 is not set
+CONFIG_TARGET_ARMV8_AARCH64=y
# CONFIG_TARGET_ARMV7 is not set
CONFIG_USE_CACHE=y
CONFIG_USE_L3CACHE=y
CONFIG_USE_MMU=y
-CONFIG_USE_SYS_TICK=y
-CONFIG_USE_AARCH64_L1_TO_AARCH32=y
+# CONFIG_USE_SYS_TICK is not set
# end of Arch Configuration
#
# Board Configuration
#
-CONFIG_TARGET_F2000_4=y
+# CONFIG_TARGET_F2000_4 is not set
# CONFIG_TARGET_E2000 is not set
-# CONFIG_TARGET_D2000 is not set
+CONFIG_TARGET_D2000=y
# end of Board Configuration
#
@@ -39,15 +41,8 @@ CONFIG_TARGET_F2000_4=y
# CONFIG_USE_SPI is not set
# CONFIG_USE_QSPI is not set
CONFIG_USE_GIC=y
-CONFIG_EBABLE_GICV3=y
-CONFIG_USE_SERIAL=y
-
-#
-# Usart Configuration
-#
-CONFIG_ENABLE_Pl011_UART=y
-# end of Usart Configuration
-
+CONFIG_ENABLE_GICV3=y
+# CONFIG_USE_SERIAL is not set
# CONFIG_USE_GPIO is not set
# CONFIG_USE_IOMUX is not set
CONFIG_USE_ETH=y
@@ -55,15 +50,10 @@ CONFIG_USE_ETH=y
#
# Eth Configuration
#
-# CONFIG_ENABLE_F_XMAC is not set
-CONFIG_ENABLE_F_GMAC=y
-
-#
-# F_GMAC Configuration
-#
-# CONFIG_F_GMAC_PHY_COMMON is not set
-CONFIG_F_GMAC_PHY_AR803X=y
-# end of F_GMAC 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
@@ -73,20 +63,23 @@ CONFIG_F_GMAC_PHY_AR803X=y
# 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
# end of Components Configuration
-CONFIG_USE_LIBC=y
+CONFIG_USE_G_LIBC=y
+# CONFIG_USE_NEW_LIBC is not set
# end of Standalone Setting
#
# Building Option
#
-CONFIG_ENVI_UBUNTU_20_04=y
#
# Cross-Compiler Setting
#
CONFIG_COMPILER_NO_STD_STARUP=y
+CONFIG_GCC_OPTIMIZE_LEVEL=0
# CONFIG_USE_EXT_COMPILER is not set
# end of Cross-Compiler Setting
@@ -98,10 +91,10 @@ CONFIG_LOG_INFO=y
# CONFIG_LOG_NONE is not set
#
-# GNU Linker Setting
+# Linker Options
#
-CONFIG_AARCH32_RAM_LD=y
-# CONFIG_AARCH64_RAM_LD is not set
+# CONFIG_AARCH32_RAM_LD is not set
+CONFIG_AARCH64_RAM_LD=y
# CONFIG_USER_DEFINED_LD is not set
CONFIG_LINK_SCRIPT_ROM=y
CONFIG_ROM_START_UP_ADDR=0x80100000
@@ -109,9 +102,9 @@ CONFIG_ROM_SIZE_MB=1
CONFIG_LINK_SCRIPT_RAM=y
CONFIG_RAM_START_UP_ADDR=0x81000000
CONFIG_RAM_SIZE_MB=64
-CONFIG_HEAP_SIZE=0x100000
+CONFIG_HEAP_SIZE=1
CONFIG_STACK_SIZE=0x100000
-# end of GNU Linker Setting
+# end of Linker Options
# end of Building Option
#
@@ -128,11 +121,5 @@ CONFIG_FREERTOS_USE_UART=y
#
# FreeRTOS Setting
#
-#CONFIG_USE_LWIP=y
-
-#
-# LWIP Configuration
-#
-#CONFIG_LWIP_F_GMAC=y
-# end of LWIP Configuration
+# CONFIG_USE_LWIP is not set
# end of FreeRTOS Setting
diff --git a/example/template/sdkconfig.h b/example/template/sdkconfig.h
index 179f0caef381934ba8bccccfb3858c2cd8693a37..fdb8d1c4ed5479e744536e0423a6bdb7c3bf2af4 100644
--- a/example/template/sdkconfig.h
+++ b/example/template/sdkconfig.h
@@ -3,9 +3,10 @@
/* Project Configuration */
-#define CONFIG_TARGET_NAME "ft2004_freertos"
-/*CONFIG_LWIP_POLL_TEST=y */
-/* CONFIG_LWIP_INTRRUPT_TEST is not set */
+/* Template Configuration */
+
+#define CONFIG_TARGET_NAME "d2000_freertos"
+/* end of Template Configuration */
/* end of Project Configuration */
/* Standalone Setting */
@@ -14,21 +15,20 @@
/* Arch Configuration */
-#define CONFIG_TARGET_ARMV8_AARCH32
-/* CONFIG_TARGET_ARMV8_AARCH64 is not set */
+/* CONFIG_TARGET_ARMV8_AARCH32 is not set */
+#define CONFIG_TARGET_ARMV8_AARCH64
/* CONFIG_TARGET_ARMV7 is not set */
#define CONFIG_USE_CACHE
#define CONFIG_USE_L3CACHE
#define CONFIG_USE_MMU
-#define CONFIG_USE_SYS_TICK
-#define CONFIG_USE_AARCH64_L1_TO_AARCH32
+/* CONFIG_USE_SYS_TICK is not set */
/* end of Arch Configuration */
/* Board Configuration */
-#define CONFIG_TARGET_F2000_4
+/* CONFIG_TARGET_F2000_4 is not set */
/* CONFIG_TARGET_E2000 is not set */
-/* CONFIG_TARGET_D2000 is not set */
+#define CONFIG_TARGET_D2000
/* end of Board Configuration */
/* Components Configuration */
@@ -36,27 +36,18 @@
/* CONFIG_USE_SPI is not set */
/* CONFIG_USE_QSPI is not set */
#define CONFIG_USE_GIC
-#define CONFIG_EBABLE_GICV3
-#define CONFIG_USE_SERIAL
-
-/* Usart Configuration */
-
-#define CONFIG_ENABLE_Pl011_UART
-/* end of Usart Configuration */
+#define CONFIG_ENABLE_GICV3
+/* CONFIG_USE_SERIAL is not set */
/* CONFIG_USE_GPIO is not set */
/* CONFIG_USE_IOMUX is not set */
#define CONFIG_USE_ETH
/* Eth Configuration */
-/* CONFIG_ENABLE_F_XMAC is not set */
-#define CONFIG_ENABLE_F_GMAC
-
-/* F_GMAC Configuration */
-
-/* CONFIG_F_GMAC_PHY_COMMON is not set */
-#define CONFIG_F_GMAC_PHY_AR803X
-/* end of F_GMAC Configuration */
+/* CONFIG_ENABLE_FXMAC is not set */
+#define CONFIG_ENABLE_FGMAC
+#define CONFIG_FGMAC_PHY_COMMON
+/* CONFIG_FGMAC_PHY_AR803X is not set */
/* end of Eth Configuration */
/* CONFIG_USE_CAN is not set */
/* CONFIG_USE_I2C is not set */
@@ -65,17 +56,19 @@
/* 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 */
/* end of Components Configuration */
-#define CONFIG_USE_LIBC
+#define CONFIG_USE_G_LIBC
+/* CONFIG_USE_NEW_LIBC is not set */
/* end of Standalone Setting */
/* Building Option */
-#define CONFIG_ENVI_UBUNTU_20_04
-
/* Cross-Compiler Setting */
#define CONFIG_COMPILER_NO_STD_STARUP
+#define CONFIG_GCC_OPTIMIZE_LEVEL 0
/* CONFIG_USE_EXT_COMPILER is not set */
/* end of Cross-Compiler Setting */
/* CONFIG_LOG_VERBOS is not set */
@@ -85,10 +78,10 @@
/* CONFIG_LOG_ERROR is not set */
/* CONFIG_LOG_NONE is not set */
-/* GNU Linker Setting */
+/* Linker Options */
-#define CONFIG_AARCH32_RAM_LD
-/* CONFIG_AARCH64_RAM_LD is not set */
+/* CONFIG_AARCH32_RAM_LD is not set */
+#define CONFIG_AARCH64_RAM_LD
/* CONFIG_USER_DEFINED_LD is not set */
#define CONFIG_LINK_SCRIPT_ROM
#define CONFIG_ROM_START_UP_ADDR 0x80100000
@@ -96,9 +89,9 @@
#define CONFIG_LINK_SCRIPT_RAM
#define CONFIG_RAM_START_UP_ADDR 0x81000000
#define CONFIG_RAM_SIZE_MB 64
-#define CONFIG_HEAP_SIZE 0x100000
-#define CONFIG_STACK_SIZE 0x100000
-/* end of GNU Linker Setting */
+#define CONFIG_HEAP_SIZE 1
+#define CONFIG_STACK_SIZE 0x400
+/* end of Linker Options */
/* end of Building Option */
/* Component Configuration */
@@ -111,12 +104,7 @@
/* FreeRTOS Setting */
-/*CONFIG_USE_LWIP=y */
-
-/* LWIP Configuration */
-
-/*CONFIG_LWIP_F_GMAC=y */
-/* end of LWIP Configuration */
+/* CONFIG_USE_LWIP is not set */
/* end of FreeRTOS Setting */
#endif
diff --git a/install.py b/install.py
index 1beee3228681b82fba00421f2d4891438c2ae94a..e03dcebec0c2b81e83a709c1097f2e62071e9e71 100644
--- a/install.py
+++ b/install.py
@@ -86,7 +86,7 @@ os.system("chmod +x ./make/*.mk --silent ")
os.system("chmod +x ./lib/Kconfiglib/*.py --silent ")
# Add standalone sdk
-standalone_sdk_v="v0.1.8"
+standalone_sdk_v="v0.1.15"
standalone_path=freertos_sdk_path + '/standalone'
standalone_branche="master"
standalone_remote="https://gitee.com/phytium_embedded/phytium-standalone-sdk.git"
diff --git a/make/build_all.mk b/make/build_all.mk
new file mode 100644
index 0000000000000000000000000000000000000000..66b4c72dd90b46fc72585a6e6a90f779aa85c853
--- /dev/null
+++ b/make/build_all.mk
@@ -0,0 +1,74 @@
+# /*
+# * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
+# *
+# * SPDX-License-Identifier: Apache-2.0.
+# *
+# * @Date: 2021-10-28 14:51:27
+# * @LastEditTime: 2021-10-28 15:04:55
+# * @Description: This files is for build images for all platform
+# *
+# * @Modify History:
+# * Ver Who Date Changes
+# * ----- ------ -------- --------------------------------------
+# */
+
+EG_CONFIGS_DIR := ./configs
+
+
+# 根据例程默认,编译各平台的镜像
+.PHONY: load_e2000_aarch32 load_e2000_aarch64 backup_kconfig
+
+load_ft2004_aarch32:
+ @echo "========Load for FT2000/4 AARCH32 Start============="
+ make ldconfig LDCONFIG_ARG=$(EG_CONFIGS_DIR)/ft2004_aarch32_eg_configs
+ @echo "==============FT2000/4 AARCH32======================="
+
+load_ft2004_aarch64:
+ @echo "=======Load for FT2000/4 AARCH64 Start==============="
+ make ldconfig LDCONFIG_ARG=$(EG_CONFIGS_DIR)/ft2004_aarch64_eg_configs
+ @echo "==============FT2000/4 AARCH64======================="
+
+load_d2000_aarch32:
+ @echo "=======Load for D2000 AARCH32===================="
+ make ldconfig LDCONFIG_ARG=$(EG_CONFIGS_DIR)/d2000_aarch32_eg_configs
+ @echo "==============D2000 AARCH32======================="
+
+load_d2000_aarch64:
+ @echo "========Load for D2000 AARCH64==================="
+ make ldconfig LDCONFIG_ARG=$(EG_CONFIGS_DIR)/d2000_aarch64_eg_configs
+ @echo "==============D2000 AARCH64========================="
+
+load_e2000_aarch32:
+ @echo "=======Load for E2000 AARCH32===================="
+ make ldconfig LDCONFIG_ARG=$(EG_CONFIGS_DIR)/e2000_aarch32_eg_configs
+ @echo "==============E2000 AARCH32======================="
+
+load_e2000_aarch64:
+ @echo "========Load for E2000 AARCH64==================="
+ make ldconfig LDCONFIG_ARG=$(EG_CONFIGS_DIR)/e2000_aarch64_eg_configs
+ @echo "==============E2000 AARCH64========================="
+
+backup_kconfig:
+ifdef CONFIG_TARGET_ARMV8_AARCH32
+ifdef CONFIG_TARGET_D2000
+ cp sdkconfig ./configs/d2000_aarch32_eg_configs
+endif
+ifdef CONFIG_TARGET_F2000_4
+ cp sdkconfig ./configs/ft2004_aarch32_eg_configs
+endif
+ifdef CONFIG_TARGET_E2000
+ cp sdkconfig ./configs/e2000_aarch32_eg_configs
+endif
+endif
+
+ifdef CONFIG_TARGET_ARMV8_AARCH64
+ifdef CONFIG_TARGET_D2000
+ cp sdkconfig ./configs/d2000_aarch64_eg_configs
+endif
+ifdef CONFIG_TARGET_F2000_4
+ cp sdkconfig ./configs/ft2004_aarch64_eg_configs
+endif
+ifdef CONFIG_TARGET_E2000
+ cp sdkconfig ./configs/e2000_aarch64_eg_configs
+endif
+endif
\ No newline at end of file
diff --git a/make/build_freertos.mk b/make/build_freertos.mk
index 9eeb9548ec765ad4f562fe64456e9f94de66d5e1..aafbaedd666875447e0eb719c7bd9793698089ee 100755
--- a/make/build_freertos.mk
+++ b/make/build_freertos.mk
@@ -8,4 +8,5 @@ include $(FREERTOS_SDK_ROOT)/make/preconfig.mk
include $(FREERTOS_SDK_ROOT)/make/complier.mk
include $(FREERTOS_SDK_ROOT)/make/buildinfo.mk
include $(FREERTOS_SDK_ROOT)/make/packsource.mk
-include $(FREERTOS_SDK_ROOT)/make/menuconfig.mk
\ No newline at end of file
+include $(FREERTOS_SDK_ROOT)/make/menuconfig.mk
+include $(FREERTOS_SDK_ROOT)/make/build_all.mk
\ No newline at end of file
diff --git a/make/complier.mk b/make/complier.mk
index e874333d0557ed54b083fd3d2bdff12ecc14876b..fd65240f35b5b1ad5cab450b9f179679d62dfa1e 100755
--- a/make/complier.mk
+++ b/make/complier.mk
@@ -76,10 +76,12 @@ EXCL_SRC ?= # 在源文件目录中不编译
#OUTPUT_DIR ?= build # 输出目录
$(shell if [ ! -e $(OUTPUT_DIR) ];then mkdir -p $(OUTPUT_DIR); fi)
+
include $(STANDALONE_DIR)/standalone.mk
include $(STANDALONE_DIR)/lib/lib.mk
include $(FREERTOS_SDK_ROOT)/make/ld.mk
include $(FREERTOS_SDK_ROOT)/third-party/third-party.mk
+include $(FREERTOS_SDK_ROOT)/standalone_adaptive.mk
INC_DIR := $(INC_DIR) $(USR_INC_DIR)
@@ -112,7 +114,7 @@ APP_S_SRC := $(foreach dir, $(SRC_DIR), $(wildcard $(dir)/*.S))
OBJ_FILES := $(patsubst %, $(OUTPUT_DIR)/%, $(APP_S_SRC:.S=.o)) \
$(patsubst %, $(OUTPUT_DIR)/%, $(APP_C_SRC:.c=.o))
-EXCL_OBJS ?= $(patsubst %, $(OUTPUT_DIR)/%, $(EXCL_SRC:.c=.o))
+EXCL_OBJS ?= $(patsubst %, $(OUTPUT_DIR)/%, $(EXCL_SRC:.c=.o) $(EXCL_SRC:.S=.o))
OBJ_FILES := $(filter-out $(EXCL_OBJS), $(OBJ_FILES))
OBJ_FILES += $(LIBC)
@@ -135,6 +137,7 @@ ifdef CONFIG_USE_G_LIBC
LDFLAGS += -lgcc -L $(LIBPATH)
INC_DIR := $(INC_DIR) $(CROSS_PATH)/arm-none-eabi/include
OBJ_FILES += $(CROSS_PATH)/arm-none-eabi/lib/thumb/v7/nofp/libc.a \
+ $(CROSS_PATH)/arm-none-eabi/lib/thumb/v7/nofp/libm.a \
$(CROSS_PATH)/lib/gcc/arm-none-eabi/$(CC_VERSION)/libgcc.a
endif
endif
@@ -146,6 +149,7 @@ ifdef CONFIG_USE_NEW_LIBC
LIBPATH := $(CROSS_PATH)/newlib/arm-none-eabi/newlib
INC_DIR := $(INC_DIR) $(CROSS_PATH)/newlib/newlib/libc/include
OBJ_FILES += $(CROSS_PATH)/newlib/arm-none-eabi/newlib/libc.a \
+ $(CROSS_PATH)/newlib/arm-none-eabi/newlib/libm.a \
$(CROSS_PATH)/lib/gcc/arm-none-eabi/$(CC_VERSION)/libgcc.a
endif
@@ -153,6 +157,7 @@ ifdef CONFIG_USE_NEW_LIBC
LIBPATH := $(CROSS_PATH)/newlib/aarch64-none-elf/newlib
INC_DIR := $(INC_DIR) $(CROSS_PATH)/newlib/newlib/libc/include
OBJ_FILES += $(CROSS_PATH)/newlib/aarch64-none-elf/newlib/libc.a \
+ $(CROSS_PATH)/newlib/aarch64-none-elf/newlib/libm.a \
$(CROSS_PATH)/lib/gcc/aarch64-none-elf/$(CC_VERSION)/libgcc.a
endif
diff --git a/make/ld/Kconfig b/make/ld/Kconfig
index 46a76361508ef2acbaad8525370e4bf08c9bc32b..431b8a4eca41645169d84f394bb168578fe1e82f 100644
--- a/make/ld/Kconfig
+++ b/make/ld/Kconfig
@@ -4,7 +4,6 @@ menu "Linker Options"
choice
prompt "Select Linker Script Template"
optional
- default QEMU_AARCH32_RAM_LD if TARGET_AARCH32_QEMU
config AARCH32_RAM_LD
bool "Use aarch32_ram.ld"
@@ -16,23 +15,6 @@ menu "Linker Options"
help
Use linkscript for booting AARCH64 Baremetal Image from DDR
- if USE_BAREMETAL_AMP
- config AARCH32_AMP_RAM_MASTER_LD
- bool "Use aarch32_amp_master_ram.ld"
- help
- Use linkscript for booting AARCH32 Master Baremetal Image from DDR
-
- config AARCH32_AMP_RAM_SLAVE_LD
- bool "Use aarch32_amp_slave_ram.ld"
- help
- Use linkscript for booting AARCH32 Slave Baremetal Image from DDR
- endif
-
- config QEMU_AARCH32_RAM_LD
- bool "Use qemu_aarch32_ram.ld"
- help
- Use linkscript booting AARCH32 Qemu from DDR
-
config USER_DEFINED_LD
bool "Other link script"
help
@@ -81,25 +63,60 @@ menu "Linker Options"
endif
config HEAP_SIZE
- hex "Heap Size"
- default "0x100000"
+ int "Heap Size (MB)"
+ default "1"
help
Assign Heap size in Linkscript
- if TARGET_ARMV8_AARCH32
- config STACK_SIZE
- hex "Stack Size"
- default "0x100000"
- help
- Assign Stack size in Linkscript
- endif
+ config STACK_SIZE
+ hex "Stack Size (Byte)"
+ default "0x100000"
+ depends on AARCH64_RAM_LD
+ help
+ Assign Stack size in Linkscript
+
+
+ config SVC_STACK_SIZE
+ hex "Aarch32 supervisor stack size (Byte)"
+ default "0x1000"
+ depends on AARCH32_RAM_LD
+ help
+ Assign Stack size in Linkscript
+
+ config SYS_STACK_SIZE
+ hex "Aarch32 system stack size (Byte)"
+ default "0x1000"
+ depends on AARCH32_RAM_LD
+ help
+ Assign system stack size in Linkscript
+
+ config IRQ_STACK_SIZE
+ hex "Aarch32 Irq stack size (Byte)"
+ default "0x1000"
+ depends on AARCH32_RAM_LD
+ help
+ Assign Irq stack size in Linkscript
+
+ config ABORT_STACK_SIZE
+ hex "Aarch32 abort stack size (Byte)"
+ default "0x1000"
+ depends on AARCH32_RAM_LD
+ help
+ Assign abort stack size in Linkscript
+
+ config FIQ_STACK_SIZE
+ hex "Aarch32 fiq stack size (Byte)"
+ default "0x1000"
+ depends on AARCH32_RAM_LD
+ help
+ Assign abort stack size in Linkscript
+
+ config UNDEF_STACK_SIZE
+ hex "Aarch32 undef stack size (Byte)"
+ default "0x1000"
+ depends on AARCH32_RAM_LD
+ help
+ Assign undef stack size in Linkscript
- if TARGET_ARMV8_AARCH64
- config STACK_TOP_ADDR
- hex "Stack Top Address"
- default "0x82000000"
- help
- Assign Stack top address in Linkscript
- endif
endmenu
diff --git a/make/ld/aarch32_ram.ld b/make/ld/aarch32_ram.ld
index 9d1ff19292012b344a83be1eaf4f7a1dffece349..590de49cad7ec2de7ba38c17e6741437a9107781 100644
--- a/make/ld/aarch32_ram.ld
+++ b/make/ld/aarch32_ram.ld
@@ -3,14 +3,9 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
-ENTRY(Startup_Aarch32)
+ENTRY(_boot)
-HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : CONFIG_HEAP_SIZE;
-
-/* pretend that 0x80100000 is ROM, 0x81000000 is RAM */
-/* because vexpress-qemu is not able to emulate flash memory as ROM */
-/* space is significant to avoid syntax error when linking */
MEMORY
{
ROM (rx) : ORIGIN = CONFIG_ROM_START_UP_ADDR, LENGTH = CONFIG_ROM_SIZE_MB * 1M
@@ -19,95 +14,116 @@ MEMORY
SECTIONS
{
+ .vectors : {
+ *(.boot)
+ . = ALIGN(64);
+ KEEP(*(.vectors))
+
+ } > ROM
+
.text : {
- _text_start = .;
- KEEP(*(.Startup_Aarch32))
- *(.vector_table)
*(.text*)
- *(.rodata*) /* make life easier without rodata section */
+ *(.gnu.linkonce.t.*)
+ *(.plt)
+ *(.gnu_warning)
+ *(.gcc_execpt_table)
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
+ *(.vfp11_veneer)
+ *(.ARM.extab)
+ *(.gnu.linkonce.armextab.*)
+ *(.note.gnu.build-id)
} > ROM /* .text should linked to ROM */
. = ALIGN(8);
/* .ARM.exidx is sorted, so has to go in its own output section. */
- .ARM :
- {
+ .ARM :{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
/* This is used by the startup in order to initialize the .data secion */
} > ROM
-
- .rodata :
- {
- *(.rodata .rodata.* .gnu.linkonce.r.*)
-
- . = ALIGN(8);
+
+ .interp : {
+ KEEP (*(.interp))
+ } > ROM
+
+ .note-ABI-tag : {
+ KEEP (*(.note-ABI-tag))
+ } > ROM
+
+ .rodata :{
+ __rodata_start = .;
+ *(.rodata)
+ *(.rodata.*)
+ *(.gnu.linkonce.r.*)
+ __rodata_end = .;
+ } > ROM
+
+ .rodata1 : {
+ __rodata1_start = .;
+ *(.rodata1)
+ *(.rodata1.*)
+ __rodata1_end = .;
+ } > ROM
+
+ .le_shell (ALIGN(64)):{
+ . = ALIGN(4096);
_shell_command_start = .;
KEEP (*(shellCommand))
- _shell_command_end = .;
- } > ROM
+ _shell_command_end = .;
+ . = ALIGN(4096); /* align to page size */
+ _shell_code_end = .;
+ }> ROM
- .init :
- {
+ .init :{
KEEP (*(SORT_NONE(.init)))
}> ROM
- .fini :
- {
+ .fini :{
KEEP (*(SORT_NONE(.fini)))
}> ROM
- .eh_frame :
- {
+ .eh_frame :{
KEEP (*(.eh_frame))
}> ROM
- .ARM.extab :
- {
+ .ARM.extab :{
*(.ARM.extab* .gnu.linkonce.armextab.*)
}> ROM
- .ARM.exidx :
- {
+ .ARM.exidx :{
__exidx_start = .;
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
}> ROM
- .fini_array :
- {
+ .fini_array :{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array ))
PROVIDE_HIDDEN (__fini_array_end = .);
}> ROM
- .dtors :
- {
+ .dtors :{
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
. = ALIGN(16);
- _rom_end = .;
+ __rom_end__ = .;
}> ROM
-
- . = ALIGN(4096); /* align to page size */
- _text_end = .;
-
/* data segment, contains data that can be modified by the program at run-time,
global and static variables that have a non-zero initial value will normally go here */
- .data : AT(_text_end){
- _data_start = .; /* .data section will be redise at runtime */
+ .data : AT(__rom_end__){
+ __data_start__ = .; /* .data section will be redise at runtime */
*(.data)
. = ALIGN(4096); /* align to page size */
- _data_end = .;
+ __data_end__ = .;
} > RAM /* link it all to RAM */
/* unitialized data segment, variables explicitly initialized with zero to BSS */
- .bss : {
+ .bss (NOLOAD): {
__bss_start__ = .;
_bss_start = __bss_start__;
*(.bss)
@@ -115,33 +131,58 @@ SECTIONS
_bss_end = __bss_end__;
} > RAM
- .heap :
- {
- . = ALIGN(8);
+ .sbss (NOLOAD) : {
+ __sbss_start__ = .;
+ *(.sbss)
+ *(.sbss.*)
+ *(.gnu.linkonce.sb.*)
+ __sbss_end__ = .;
+ } > RAM
+
+ .heap (NOLOAD):{
+ . = ALIGN(16);
__end__ = .;
PROVIDE(end = .);
HeapBase = .;
_heap_start = .;
- . += HEAP_SIZE;
+ . += CONFIG_HEAP_SIZE* 1M;
_heap_end = .;
HeapLimit = .; /* Add for _sbrk */
} > RAM
- _fiq_stack_start = ADDR(.heap) + SIZEOF(.heap);
- _fiq_stack_end = _fiq_stack_start + CONFIG_STACK_SIZE; /* 64 KB */
+ .stack (NOLOAD):{
+
+ . = ALIGN(16);
+ _supervisor_stack_end = .;
+ . += CONFIG_SVC_STACK_SIZE;
+ _supervisor_stack = .;
+ __supervisor_stack = _supervisor_stack;
+
+ . = ALIGN(16);
+ _irq_stack_end = .;
+ . += CONFIG_IRQ_STACK_SIZE;
+ __irq_stack = .;
+
+ __sys_stack = .;
+ . += CONFIG_SYS_STACK_SIZE;
+ . = ALIGN(16);
+ __sys_stack = .;
+
+ _abort_stack_end = .;
+ . += CONFIG_ABORT_STACK_SIZE;
+ . = ALIGN(16);
+ __abort_stack = .;
- _irq_stack_start = _fiq_stack_end;
- _irq_stack_end = _irq_stack_start + CONFIG_STACK_SIZE; /* 64 KB */
+ _fiq_stack_end = .;
+ . += CONFIG_FIQ_STACK_SIZE;
+ . = ALIGN(16);
+ __fiq_stack = .;
- _sys_stack_start = _irq_stack_end;
- _sys_stack_end = _sys_stack_start + CONFIG_STACK_SIZE; /* 64 KB */
+ _undef_stack_end = .;
+ . += CONFIG_UNDEF_STACK_SIZE;
+ . = ALIGN(16);
+ __undef_stack = .;
- /* put svc at end and start up with SVC mode */
- _svc_stack_start = _sys_stack_end;
- _svc_stack_end = _svc_stack_start + CONFIG_STACK_SIZE; /* 64 KB */
+ } > RAM
- _irq_stack_size = _irq_stack_end - _irq_stack_start;
- _fiq_stack_size = _fiq_stack_end - _fiq_stack_start;
- _sys_stack_size = _sys_stack_end - _sys_stack_start;
- _svc_stack_size = _svc_stack_end - _svc_stack_start;
}
diff --git a/make/ld/aarch64_ram.ld b/make/ld/aarch64_ram.ld
index ea919ee5dd4e910b7991bc5106032589d5b1de04..662a53653377121696333510d83b35c795dd0914 100644
--- a/make/ld/aarch64_ram.ld
+++ b/make/ld/aarch64_ram.ld
@@ -1,127 +1,169 @@
#include "sdkconfig.h"
-ENTRY(_boot)
-
MEMORY
{
-#if defined(CONFIG_LINK_SCRIPT_ROM)
ROM (rx) : ORIGIN = CONFIG_ROM_START_UP_ADDR, LENGTH = CONFIG_ROM_SIZE_MB * 1M
-#endif
-#if defined(CONFIG_LINK_SCRIPT_RAM)
RAM (rwx): ORIGIN = CONFIG_RAM_START_UP_ADDR, LENGTH = CONFIG_RAM_SIZE_MB * 1M
-#endif
}
+ENTRY(_vector_table)
SECTIONS
{
+ .text : {
+ KEEP (*(.vectors))
+ *(.boot)
+ *(.text)
+ *(.text.*)
+ *(.gnu.linkonce.t.*)
+ *(.plt)
+ *(.gnu_warning)
+ *(.gcc_execpt_table)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.ARM.extab)
+ *(.gnu.linkonce.armextab.*)
+ } > ROM
- .text :
- {
- KEEP(*(.StartUp))
- KEEP(*(.vectors))
- KEEP(*(.text.boot))
- *(.text)
- . = ALIGN(8);
- }> ROM
+ .got : {
+ *(.got)
+ } > ROM
+ .got1 : {
+ *(.got1)
+ } > ROM
- .rodata :
- {
- *(.rodata .rodata.* .gnu.linkonce.r.*)
+ .got2 : {
+ *(.got2)
+ } > ROM
- . = ALIGN(8);
- _shell_command_start = .;
- KEEP (*(shellCommand))
- _shell_command_end = .;
+ .note.gnu.build-id : {
+ KEEP (*(.note.gnu.build-id))
} > ROM
- .init :
- {
- KEEP (*(SORT_NONE(.init)))
- }> ROM
+ .init (ALIGN(64)): {
+ KEEP (*(.init))
+ } > ROM
- .fini :
- {
- KEEP (*(SORT_NONE(.fini)))
- }> ROM
+ .fini (ALIGN(64)): {
+ KEEP (*(.fini))
+ } > ROM
- .eh_frame :
- {
- KEEP (*(.eh_frame))
- }> ROM
+ .interp : {
+ __interp_start = .;
+ KEEP (*(.interp))
+ __interp_end = .;
+ } > ROM
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- }> ROM
+ .note-ABI-tag : {
+ __note-ABI-tag_start = .;
+ KEEP (*(.note-ABI-tag))
+ __note-ABI-tag_end = .;
+ } > ROM
- .ARM.exidx :
- {
- __exidx_start = .;
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- __exidx_end = .;
- }> ROM
+ .preinit_array : {
+ __preinit_array_start = .;
+ KEEP (*(SORT(.preinit_array.*)))
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+ } > ROM
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array ))
- PROVIDE_HIDDEN (__fini_array_end = .);
- }> ROM
+ .init_array : {
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+ } > ROM
- .dtors :
- {
- KEEP (*crtbegin.o(.dtors))
- KEEP (*crtbegin?.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- . = ALIGN(16);
- _rom_end = .;
+ .fini_array : {
+ __fini_array_start = .;
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array))
+ __fini_array_end = .;
+ } > ROM
+
+ .rodata (ALIGN(64)): {
+ __rodata_start = .;
+ *(.rodata)
+ *(.rodata.*)
+ *(.gnu.linkonce.r.*)
+ __rodata_end = .;
+ } > ROM
+
+ .le_shell (ALIGN(64)):{
+ . = ALIGN(4096);
+ _shell_command_start = .;
+ KEEP (*(shellCommand))
+ _shell_command_end = .;
+ . = ALIGN(4096); /* align to page size */
+ _shell_code_end = .;
}> ROM
- .data :AT(ADDR(.dtors) + SIZEOF(.dtors))
- {
- __data_start = .;
- *(.data)
- *(.data .data.* .gnu.linkonce.d.*)
- SORT(CONSTRUCTORS)
+
+ .rodata1 (ALIGN(64)): {
+ __rodata1_start = .;
+ *(.rodata1)
+ *(.rodata1.*)
+ __rodata1_end = .;
+ } > ROM
+
+
+ .gcc_except_table : {
+ *(.gcc_except_table)
+ . = ALIGN(16);
+ __rom_end__ = .;
+ } > ROM
+
+
+ .data :AT(ADDR(.gcc_except_table) + SIZEOF(.gcc_except_table)){
+ __data_start__ = .;
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d.*)
+ *(.jcr)
+ *(.got)
+ *(.got.plt)
. = ALIGN(4096); /* align to page size */
- __data_end = .;
- }> RAM
+ __data_end__ = .;
+ } > RAM
+ .sbss (NOLOAD) : {
+ __sbss_start__ = .;
+ *(.sbss)
+ *(.sbss.*)
+ *(.gnu.linkonce.sb.*)
+ __sbss_end__ = .;
+ } > RAM
+ .bss (NOLOAD) : {
+ . = ALIGN(64);
+ __bss_start__ = .;
+ *(.bss)
+ *(.bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(64);
+ __bss_end__ = .;
+ } > RAM
- .bss :
- {
- . = ALIGN(8);
- __bss_start__ = .;
- __bss_start = __bss_start__;
- bss = .;
- *(.bss)
- . = ALIGN(8);
- __bss_end__ = .;
- __bss_end = __bss_end__;
- }> RAM
- .heap (NOLOAD):
- {
+ .heap (NOLOAD):{
. = ALIGN(64);
- __end__ = .;
- PROVIDE(end = .);
+ _heap = .;
HeapBase = .;
_heap_start = .;
- . = . + CONFIG_HEAP_SIZE;
+ . = . + CONFIG_HEAP_SIZE* 1M;
_heap_end = .;
HeapLimit = .;
} > RAM
- . = CONFIG_STACK_TOP_ADDR ; /* stack memory */
- stack_top = .;
+ .stack (NOLOAD) : {
+ . = ALIGN(64);
+ _el1_stack_end = .;
+ . += CONFIG_STACK_SIZE;
+ __el1_stack = .;
+ } > RAM
}
-__bss_size = (__bss_end - __bss_start)>>3;
\ No newline at end of file
diff --git a/make/menuconfig.mk b/make/menuconfig.mk
index 959b6949d7cc4eafc05b35ee92a47dffce9b8958..61433c51fe39ae28aa28b5e6bc95984406cf9887 100755
--- a/make/menuconfig.mk
+++ b/make/menuconfig.mk
@@ -38,6 +38,11 @@ lddefconfig:
@cp $(FREERTOS_SDK_ROOT)/configs/$(DEF_KCONFIG) ./$(KCONFIG_CONFIG) -f
@echo "get default configs at " $(FREERTOS_SDK_ROOT)/configs/$(DEF_KCONFIG)
+ldconfig:
+ cp $(LDCONFIG_ARG) ./$(KCONFIG_CONFIG) -f
+ @echo "get configs at " $(LDCONFIG_ARG)
+ $(STANDALONE_DIR)/lib/Kconfiglib/genconfig.py
+
# load default configs,then generate sdkconfig.h, and clean build targets
# support platform
# FT2000/4 AARCH32/AARCH64
diff --git a/standalone_adaptive.mk b/standalone_adaptive.mk
new file mode 100644
index 0000000000000000000000000000000000000000..1225afa2b93b83b0da7a4bacccf67e10db9b569a
--- /dev/null
+++ b/standalone_adaptive.mk
@@ -0,0 +1,11 @@
+
+EXCL_SRC += $(FREERTOS_SDK_ROOT)/standalone/common/fmemory_pool.c
+
+
+ifdef CONFIG_TARGET_ARMV8_AARCH64
+EXCL_SRC += $(FREERTOS_SDK_ROOT)/standalone/arch/armv8/aarch64/gcc/boot.S
+EXCL_SRC += $(FREERTOS_SDK_ROOT)/standalone/arch/armv8/aarch64/gcc/vectors.S
+EXCL_SRC += $(FREERTOS_SDK_ROOT)/standalone/arch/armv8/aarch64/gcc/vectors_g.c
+else
+EXCL_SRC += $(FREERTOS_SDK_ROOT)/standalone/arch/armv8/aarch32/gcc/vector.S
+endif
diff --git a/third-party/Kconfig b/third-party/Kconfig
index 0bae113157ca8eb32a8348ab7ca8c65f5de76200..3071d5eb7abdb4f6a39489eb020948a5827adf11 100644
--- a/third-party/Kconfig
+++ b/third-party/Kconfig
@@ -1,9 +1,3 @@
-# config USE_COREMARK
-# bool
-# depends on USE_LIBC
-# prompt "Use Coremark"
-# help
-# Include Coremark for Benchmark
config USE_LWIP
bool
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h b/third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h
index 7d0134245dedd138fa8e429521627a874172fa5d..71a59afd671f6c4fecbf58f29efb18633cbee4f4 100644
--- a/third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch32/FreeRTOSConfig.h
@@ -205,8 +205,8 @@ nothing to return to. To avoid this define configTASK_RETURN_ADDRESS to 0. */
vClearTickInterrupt(); \
}while (0)
-#define FreeRTOS_IRQ_Handler IRQ_Handler
-#define FreeRTOS_SWI_Handler SWI_Handler
+#define FreeRTOS_IRQ_Handler IRQHandler
+#define FreeRTOS_SWI_Handler SWIHandler
#define configINTERRUPT_CONTROLLER_BASE_ADDRESS (0x71800000)
#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET (0x2000UL)
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch32/vector.S b/third-party/freertos/portable/GCC/ft_platform/aarch32/vector.S
new file mode 100644
index 0000000000000000000000000000000000000000..d7615cf248c25f37cd740cc992997c01e632dab4
--- /dev/null
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch32/vector.S
@@ -0,0 +1,80 @@
+.globl _boot
+.globl _vector_table
+
+.globl FiqInterruptHandler
+.globl DataAbortInterruptHandler
+.globl PrefetchAbortInterruptHandler
+.globl UndefineInterruptHandler
+
+
+.set EXCEPTION_FRAME_SIZE, (17*4)
+
+/* allocatable and executable */
+.section .vectors, "a"
+
+_vector_table:
+ B _boot
+ B Undefined
+ B SWIHandler
+ B PrefetchAbortHandler
+ B DataAbortHandler
+ NOP /* Placeholder for address exception vector*/
+ B IRQHandler
+ B FiqHandler
+
+
+
+
+.macro PushExceptionReg
+ sub sp, sp, #EXCEPTION_FRAME_SIZE /* Sizeof(ExceptionFrame) */
+ stmia sp, {r0 - r12} /* Calling r0-r12 */
+ mov r0, sp
+ mrs r6, spsr /* Save CPSR */
+ str lr, [r0, #15*4] /* Push PC */
+ str r6, [r0, #16*4] /* Push CPSR */
+ cps #0x13 /* C运行环境所运行的模式 */
+ str sp, [r0, #13*4] /* Save calling SP */
+ str lr, [r0, #14*4] /* Save calling PC */
+.endm
+
+
+
+.align 4
+.arm
+.weak IRQHandler
+.type IRQHandler, %function
+@.global IRQHandler
+IRQHandler: /* 0x18 IRQ */
+ bl IRQHandler
+ bl .
+
+
+.align 4
+.arm
+.weak SWIHandler
+.type SWIHandler, %function
+@.global SWIHandler
+SWIHandler: /* 0x18 IRQ */
+ bl SWIHandler
+ bl .
+
+Undefined: /* Undefined handler */
+ PushExceptionReg
+ cps #0x1B
+ bl UndefineInterruptHandler
+ bl .
+
+PrefetchAbortHandler:
+ PushExceptionReg
+ bl PrefetchAbortInterruptHandler
+ bl .
+
+DataAbortHandler:
+ PushExceptionReg
+ bl DataAbortInterruptHandler
+ bl .
+
+FiqHandler: /* FIQ vector handler */
+ PushExceptionReg
+ bl FiqInterruptHandler
+ bl .
\ No newline at end of file
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h b/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h
index 07566640706f6d7e908e64b61aeee837c29e3804..45ec5d249f7058c727c9ab972f63c8c10a1bde9f 100644
--- a/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/FreeRTOSConfig.h
@@ -188,4 +188,8 @@ QEMU-Virt. */
#define configUSE_TRACE_FACILITY 1
+
+#define FreeRTOS_IRQ_Handler IRQInterruptHandler
+#define FreeRTOS_SWI_Handler SynchronousInterruptHandler
+
#endif /* FREERTOS_CONFIG_H */
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/boot.S b/third-party/freertos/portable/GCC/ft_platform/aarch64/boot.S
new file mode 100644
index 0000000000000000000000000000000000000000..39ea6c03e1afb41f5f4dd05e63cb675edc562166
--- /dev/null
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/boot.S
@@ -0,0 +1,126 @@
+
+
+.global _boot
+
+.global _vector_table
+
+
+.set vector_base, _vector_table
+.set el1_stack, __el1_stack
+
+
+
+.section .boot,"ax"
+
+_boot:
+ mrs x0, CurrentEL
+ cmp x0, 0xc
+ b.eq El3Entry
+ cmp x0, 0x8
+ b.eq El2Entry
+ cmp x0, 0x4
+ b.eq El1Entry
+ bne hang
+ El3Entry:
+ /* initialize sctlr_el2 and hcr_el2 to save values before entering el2.*/
+ msr sctlr_el2, xzr
+ msr hcr_el2, xzr
+ /* determine the el2 execution state.*/
+ mrs x0, scr_el3
+ orr x0, x0, #(1<<10)
+ /* rw el2 execution state is aarch64.*/
+ orr x0, x0, #(1<<0)
+ /* ns el1 is non-secure world.*/
+ msr scr_el3, x0
+ mov x0, #0b01001
+ /* daif=0000 */
+ msr spsr_el3, x0
+ /* m[4:0]=01001 el2h must match scr_el3.rw*/
+
+ /* determine el2 entry.*/
+ adr x0, El2Entry
+ /* El2Entry points to the first instruction of */
+ msr elr_el3, x0
+ /* el2 code.*/
+ eret
+ El2Entry:
+
+ /* initialize the sctlr_el1 register before entering el1.*/
+ msr sctlr_el1, xzr
+ mrs x0, hcr_el2
+ orr x0, x0, #(1<<31)
+ /* rw=1 el1 execution state is aarch64.*/
+ msr hcr_el2, x0
+ mov x0, #0b00101
+ /* daif=0000 */
+ msr spsr_el2, x0
+ /* m[4:0]=00101 el1h must match hcr_el2.rw.*/
+ adr x0, El1Entry
+ /* El1Entry points to the first instruction of */
+ msr elr_el2, x0
+ /* el1 code.*/
+ eret
+
+El1Entry:
+InitEl1:
+ mov x0, #0
+ mov x1, #0
+ mov x2, #0
+ mov x3, #0
+ mov x4, #0
+ mov x5, #0
+ mov x6, #0
+ mov x7, #0
+ mov x8, #0
+ mov x9, #0
+ mov x10, #0
+ mov x11, #0
+ mov x12, #0
+ mov x13, #0
+ mov x14, #0
+ mov x15, #0
+ mov x16, #0
+ mov x17, #0
+ mov x18, #0
+ mov x19, #0
+ mov x20, #0
+ mov x21, #0
+ mov x22, #0
+ mov x23, #0
+ mov x24, #0
+ mov x25, #0
+ mov x26, #0
+ mov x27, #0
+ mov x28, #0
+ mov x29, #0
+ mov x30, #0
+ mov x1,#0x0
+ msr SCTLR_EL1, x1
+ isb
+
+ /* Set vector table base address */
+ ldr x1,=vector_base
+ msr VBAR_EL1,x1
+
+
+ /* Trap floating point access only in case of standalone BSP */
+ mrs x0, CPACR_EL1
+ /* bic x0, x0, #(0x3 << 20) */
+ orr x0, x0, #(0x3 << 20)
+ msr CPACR_EL1, x0
+ isb
+
+
+ /* Define stack pointer for current exception level */
+ ldr x2,=el1_stack
+ mov sp,x2
+
+ bl _startup /* jump to start */
+
+
+hang:
+ wfi
+ b HangPrint
+ b hang
+
+
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/port.c b/third-party/freertos/portable/GCC/ft_platform/aarch64/port.c
index 0798bcaf433e9696042195f8f5d7313a6f6e27f9..307d5ba0dbcc6c22a4aceaa19f12a67bc94a4550 100644
--- a/third-party/freertos/portable/GCC/ft_platform/aarch64/port.c
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/port.c
@@ -323,7 +323,6 @@ BaseType_t xPortStartScheduler(void)
/* Start the timer that generates the tick ISR. */
configSETUP_TICK_INTERRUPT();
-
/* Start the first task executing. */
vPortRestoreTaskContext();
}
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/portASM.S b/third-party/freertos/portable/GCC/ft_platform/aarch64/portASM.S
index 5530452f0ddb7964384390f136d6461cc3059f0f..1c8b1ad09911c3244b777e61caead0d5f727e530 100644
--- a/third-party/freertos/portable/GCC/ft_platform/aarch64/portASM.S
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/portASM.S
@@ -32,6 +32,7 @@
.extern ullMaxAPIPriorityMask
.extern pxCurrentTCB
.extern vTaskSwitchContext
+ .extern _freertos_vector_table
.extern vApplicationIRQHandler
.extern ullPortInterruptNesting
.extern ullPortTaskHasFPUContext
@@ -39,7 +40,7 @@
.extern ullPortYieldRequired
.extern ullICCEOIR
.extern ullICCIAR
- .extern _freertos_vector_table
+ .extern _vector_table
.global FreeRTOS_IRQ_Handler
.global FreeRTOS_SWI_Handler
@@ -257,7 +258,7 @@ FreeRTOS_Abort:
.align 8
.type vPortRestoreTaskContext, %function
vPortRestoreTaskContext:
-.set freertos_vector_base, _freertos_vector_table
+.set freertos_vector_base, _freertos_vector_table
/* Install the FreeRTOS interrupt handlers. */
LDR X1, =freertos_vector_base
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/portAsm_debug.c b/third-party/freertos/portable/GCC/ft_platform/aarch64/portAsm_debug.c
new file mode 100644
index 0000000000000000000000000000000000000000..5384a88997cf5f8ecd80b2bc9cc6125849ea9447
--- /dev/null
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/portAsm_debug.c
@@ -0,0 +1,22 @@
+/*
+ * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
+ *
+ * SPDX-License-Identifier: Apache-2.0.
+ *
+ * @Date: 2021-12-15 17:24:04
+ * @LastEditTime: 2021-12-15 17:28:22
+ * @Description: This files is for
+ *
+ * @Modify History:
+ * Ver Who Date Changes
+ * ----- ------ -------- --------------------------------------
+ */
+
+
+#include "stdio.h"
+
+void test_value(void * x0 ,void * x1,void * x2 ,void * x3)
+{
+ printf("x2 %p \r\n",x2) ;
+ while (1) ;
+}
\ No newline at end of file
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/vectors.S b/third-party/freertos/portable/GCC/ft_platform/aarch64/vectors.S
new file mode 100644
index 0000000000000000000000000000000000000000..d70bf54b16efda01a0e495674e96252c293013f2
--- /dev/null
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/vectors.S
@@ -0,0 +1,314 @@
+
+.globl _boot
+.globl _vector_table
+.globl _freertos_vector_table
+
+.globl FiqInterrupt
+.globl IrqInterrupt
+.globl SerrorInterrupt
+.globl SynchronousInterrupt
+.globl fpu_status
+
+
+
+
+.macro SaveRegister
+ stp X0,X1, [sp,#-0x10]!
+ stp X2,X3, [sp,#-0x10]!
+ stp X4,X5, [sp,#-0x10]!
+ stp X6,X7, [sp,#-0x10]!
+ stp X8,X9, [sp,#-0x10]!
+ stp X10,X11, [sp,#-0x10]!
+ stp X12,X13, [sp,#-0x10]!
+ stp X14,X15, [sp,#-0x10]!
+ stp X16,X17, [sp,#-0x10]!
+ stp X18,X19, [sp,#-0x10]!
+ stp X29,X30, [sp,#-0x10]!
+.endm
+
+
+.macro RestoreRegister
+ ldp X29,X30, [sp], #0x10
+ ldp X18,X19, [sp], #0x10
+ ldp X16,X17, [sp], #0x10
+ ldp X14,X15, [sp], #0x10
+ ldp X12,X13, [sp], #0x10
+ ldp X10,X11, [sp], #0x10
+ ldp X8,X9, [sp], #0x10
+ ldp X6,X7, [sp], #0x10
+ ldp X4,X5, [sp], #0x10
+ ldp X2,X3, [sp], #0x10
+ ldp X0,X1, [sp], #0x10
+.endm
+
+
+.macro SaveFloatregister
+ bl FloatSave
+/* Load the floating point context array address from fpu_context_base */
+ ldr x1,=fpu_context_base
+ ldr x0, [x1]
+
+/* Save all the floating point register to the array */
+ stp q0,q1, [x0], #0x20
+ stp q2,q3, [x0], #0x20
+ stp q4,q5, [x0], #0x20
+ stp q6,q7, [x0], #0x20
+ stp q8,q9, [x0], #0x20
+ stp q10,q11, [x0], #0x20
+ stp q12,q13, [x0], #0x20
+ stp q14,q15, [x0], #0x20
+ stp q16,q17, [x0], #0x20
+ stp q18,q19, [x0], #0x20
+ stp q20,q21, [x0], #0x20
+ stp q22,q23, [x0], #0x20
+ stp q24,q25, [x0], #0x20
+ stp q26,q27, [x0], #0x20
+ stp q28,q29, [x0], #0x20
+ stp q30,q31, [x0], #0x20
+ mrs x2, FPCR
+ mrs x3, FPSR
+ stp x2, x3, [x0], #0x10
+
+/* Save current address of floating point context array to fpu_context_base */
+ str x0, [x1]
+.endm
+
+.macro RestoreFloatRegister
+
+/* Restore the address of floating point context array from fpu_context_base */
+ ldr x1,=fpu_context_base
+ ldr x0, [x1]
+
+/* Restore all the floating point register from the array */
+ ldp x2, x3, [x0,#-0x10]!
+ msr FPCR, x2
+ msr FPSR, x3
+ ldp q30,q31, [x0,#-0x20]!
+ ldp q28,q29, [x0,#-0x20]!
+ ldp q26,q27, [x0,#-0x20]!
+ ldp q24,q25, [x0,#-0x20]!
+ ldp q22,q23, [x0,#-0x20]!
+ ldp q20,q21, [x0,#-0x20]!
+ ldp q18,q19, [x0,#-0x20]!
+ ldp q16,q17, [x0,#-0x20]!
+ ldp q14,q15, [x0,#-0x20]!
+ ldp q12,q13, [x0,#-0x20]!
+ ldp q10,q11, [x0,#-0x20]!
+ ldp q8,q9, [x0,#-0x20]!
+ ldp q6,q7, [x0,#-0x20]!
+ ldp q4,q5, [x0,#-0x20]!
+ ldp q2,q3, [x0,#-0x20]!
+ ldp q0,q1, [x0,#-0x20]!
+
+/* Save current address of floating point context array to fpu_context_base */
+ str x0, [x1]
+.endm
+
+.org 0
+
+.section .vectors, "a"
+
+_vector_table:
+.set VBAR, _vector_table
+.org VBAR
+
+ b _boot
+.org (VBAR + 0x200)
+ b SynchronousInterruptHandler
+
+.org (VBAR + 0x280)
+ b IRQInterruptHandler
+
+.org (VBAR + 0x300)
+ b FIQInterruptHandler
+
+.org (VBAR + 0x380)
+ b SErrorInterruptHandler
+
+
+SynchronousInterruptHandler:
+ SaveRegister
+/* Check if the Synchronous abort is occurred due to floating point access. */
+ mrs x0, ESR_EL1
+
+ and x0, x0, #(0x3F << 26)
+ mov x1, #(0x7 << 26)
+ cmp x0, x1
+/* If exception is not due to floating point access go to synchronous handler */
+ bne Synchronoushandler
+
+/*
+ * If excpetion occurred due to floating point access, Enable the floating point
+ * access i.e. do not trap floating point instruction
+ */
+
+ mrs x1,CPACR_EL1
+ orr x1, x1, #(0x1<<20)
+ msr CPACR_EL1, x1
+ isb
+
+/* If the floating point access was previously enabled, store FPU context
+ * registers(StoreFloat).
+ */
+ ldr x0, =fpu_status
+ ldrb w1,[x0]
+ cbnz w1, StoreFloat
+/*
+ * If the floating point access was not enabled previously, save the status of
+ * floating point accessibility i.e. enabled and store floating point context
+ * array address(fpu_context) to fpu_context_base.
+ */
+ mov w1, #0x1
+ strb w1, [x0]
+ ldr x0, =fpu_context
+ ldr x1, =fpu_context_base
+ str x0,[x1]
+ b RestoreContext
+StoreFloat:
+ SaveFloatRegister
+ b RestoreContext
+Synchronoushandler: /* 此处还需要进行压栈处理,位函数内提供打印信息 */
+ mrs x0, CPACR_EL1
+ mrs x1, ELR_EL1
+ mrs x2, SPSR_EL1
+ stp x0, x1, [sp,#-0x10]!
+ mov x21, sp
+ add x21, x21, #208
+ stp x21,x21, [sp,#-0x10]!
+ mov x0, sp
+
+ bl SynchronousInterrupt
+RestoreContext:
+ RestoreRegister
+ eret
+
+
+IRQInterruptHandler:
+ SaveRegister
+/* Save the status of SPSR, ELR and CPTR to stack */
+ mrs x0, CPACR_EL1
+ mrs x1, ELR_EL1
+ mrs x2, SPSR_EL1
+
+ stp x0, x1, [sp,#-0x10]!
+ str x2, [sp,#-0x10]!
+
+/* Trap floating point access */
+ mrs x1,CPACR_EL1
+ bic x1, x1, #(0x1<<20)
+ msr CPACR_EL1, x1
+ isb
+
+ bl IRQInterrupt
+/*
+ * If floating point access is enabled during interrupt handling,
+ * restore floating point registers.
+ */
+ mrs x0,CPACR_EL1
+ ands x0, x0, #(0x1<<20)
+ beq RestorePrevState
+
+ RestoreFloatRegister
+
+/* Restore the status of SPSR, ELR and CPTR from stack */
+RestorePrevState:
+ ldr x2,[sp],0x10
+ ldp x0, x1, [sp],0x10
+
+ msr CPACR_EL1, x0
+ msr ELR_EL1, x1
+ msr SPSR_EL1, x2
+
+ RestoreRegister
+ eret
+
+FIQInterruptHandler:
+
+ SaveRegister
+
+ bl FIQInterrupt
+
+ RestoreRegister
+
+ eret
+
+SErrorInterruptHandler:
+
+ SaveRegister
+ /* Save the status of SPSR, ELR and CPTR to stack */
+ mrs x0, CPACR_EL1
+ mrs x1, ELR_EL1
+ mrs x2, SPSR_EL1
+ stp x0, x1, [sp,#-0x10]!
+ mov x21, sp
+ add x21, x21, #208
+ stp x21,x21, [sp,#-0x10]!
+ mov x0, sp
+
+ mov x0, sp
+ bl SErrorInterrupt
+
+ RestoreRegister
+
+ eret
+
+
+
+
+.set FREERTOS_VBAR, (VBAR+0x2000)
+
+.org(FREERTOS_VBAR)
+_freertos_vector_table:
+ b FreeRTOS_SWI_Handler
+
+.org (FREERTOS_VBAR + 0x80)
+ b FreeRTOS_IRQ_Handler
+
+.org (FREERTOS_VBAR + 0x100)
+ b .
+
+.org (FREERTOS_VBAR + 0x180)
+ b .
+
+.org (FREERTOS_VBAR + 0x200)
+ b FreeRTOS_SWI_Handler
+
+.org (FREERTOS_VBAR + 0x280)
+ b FreeRTOS_IRQ_Handler
+
+.org (FREERTOS_VBAR + 0x300)
+ b .
+
+.org (FREERTOS_VBAR + 0x380)
+ b SErrorInterruptHandler /* SError/vSError */
+
+.org (FREERTOS_VBAR + 0x400)
+ b .
+
+.org (FREERTOS_VBAR + 0x480)
+ b .
+
+.org (FREERTOS_VBAR + 0x500)
+ b .
+
+.org (FREERTOS_VBAR + 0x580)
+ b .
+
+.org (FREERTOS_VBAR + 0x600)
+ b .
+
+.org (FREERTOS_VBAR + 0x680)
+ b .
+
+.org (FREERTOS_VBAR + 0x700)
+ b .
+
+.org (FREERTOS_VBAR + 0x780)
+ b .
+
+.org (FREERTOS_VBAR + 0x800)
+
+
+.align 8
+
+.end
\ No newline at end of file
diff --git a/third-party/freertos/portable/GCC/ft_platform/aarch64/vectors_g.c b/third-party/freertos/portable/GCC/ft_platform/aarch64/vectors_g.c
new file mode 100644
index 0000000000000000000000000000000000000000..276897ebfd065cead936b5123ad247ee7b66c96b
--- /dev/null
+++ b/third-party/freertos/portable/GCC/ft_platform/aarch64/vectors_g.c
@@ -0,0 +1,25 @@
+/*
+ * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
+ *
+ * SPDX-License-Identifier: Apache-2.0.
+ *
+ * @Date: 2021-12-15 11:26:01
+ * @LastEditTime: 2021-12-15 11:52:25
+ * @Description: This files is for
+ *
+ * @Modify History:
+ * Ver Who Date Changes
+ * ----- ------ -------- --------------------------------------
+ */
+
+
+
+
+
+
+#include "ft_types.h"
+
+
+volatile u8 fpu_context[528] ;
+volatile u8 *fpu_context_base ;
+volatile u8 fpu_status ;
diff --git a/third-party/freertos/portable/freertos_configs.c b/third-party/freertos/portable/freertos_configs.c
index 6430e7d47cb99300be8668547f76ba824ebd4f43..97cef5a66eaf2d8755f474526e7914d20e53ef60 100644
--- a/third-party/freertos/portable/freertos_configs.c
+++ b/third-party/freertos/portable/freertos_configs.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0.
*
* @Date: 2021-07-05 08:35:41
- * @LastEditTime: 2021-07-21 19:04:40
+ * @LastEditTime: 2021-12-15 16:59:45
* @Description: This files is for
*
* @Modify History:
@@ -18,7 +18,6 @@
#include "gicv3.h"
#include "generic_timer.h"
#include "interrupt.h"
-#include "trap.h"
#include
#include "ft_assert.h"
@@ -55,16 +54,16 @@ static u32 cntfrq; /* System frequency */
void vConfigureTickInterrupt(void)
{
- // Disable the timer
+ /* Disable the timer */
GenericTimerStop();
- // Get system frequency
+ /* Get system frequency */
cntfrq = GenericTimerFrequecy();
-
- // Set tick rate
+
+ /* Set tick rate */
GenericTimerCompare(cntfrq / configTICK_RATE_HZ);
GenericTimerInterruptEnable();
- // Set as the lowest priority
+ /* Set as the lowest priority */
InterruptSetPriority(GENERIC_TIMER_NS_IRQ_NUM, configKERNEL_INTERRUPT_PRIORITY);
InterruptUmask(GENERIC_TIMER_NS_IRQ_NUM);
@@ -76,9 +75,31 @@ void vClearTickInterrupt(void)
GenericTimerCompare(cntfrq / configTICK_RATE_HZ);
}
+
+static void vFIrqHandler(int ir)
+{
+ void *param;
+ IrqHandler isr_func;
+ extern struct IrqDesc isr_table[];
+
+ /* get interrupt service routine */
+ isr_func = isr_table[ir].handler;
+ if (isr_func)
+ {
+ /* Interrupt for myself. */
+ param = isr_table[ir].param;
+ /* turn to interrupt service routine */
+ isr_func(ir, param);
+ }
+
+ /* end of interrupt */
+ InterruptAck(ir);
+}
+
volatile unsigned int gCpuRuntime;
#ifdef __aarch64__
+
void vApplicationIRQHandler(uint32_t ulICCIAR)
{
int ulInterruptID;
@@ -97,17 +118,18 @@ void vApplicationIRQHandler(uint32_t ulICCIAR)
}
else
{
- SystemIrqHandler(ulInterruptID);
+ vFIrqHandler(ulInterruptID);
}
}
#else
+
void vApplicationFPUSafeIRQHandler(uint32_t ulICCIAR)
{
int ulInterruptID;
/* Interrupts cannot be re-enabled until the source of the interrupt is
- cleared. The ID of the interrupt is obtained by bitwise ANDing the ICCIAR
- value with 0x3FF. */
+ cleared. The ID of the interrupt is obtained by bitwise ANDing the ICCIAR
+ value with 0x3FF. */
ulInterruptID = ulICCIAR & 0x3FFUL;
/* call handler function */
@@ -116,11 +138,10 @@ void vApplicationFPUSafeIRQHandler(uint32_t ulICCIAR)
/* Generic Timer */
gCpuRuntime++;
FreeRTOS_Tick_Handler();
-
}
else
- {
- SystemIrqHandler(ulInterruptID);
+ {
+ vFIrqHandler(ulInterruptID);
}
}
#endif
diff --git a/third-party/freertos/tasks.c b/third-party/freertos/tasks.c
index c56fe949e3ae37eb4dfc1516390acc27ef37a15e..aa46398dfbefe01b9171c7831bbb6051b451b4cc 100644
--- a/third-party/freertos/tasks.c
+++ b/third-party/freertos/tasks.c
@@ -1998,7 +1998,6 @@ void vTaskStartScheduler(void)
portCONFIGURE_TIMER_FOR_RUN_TIME_STATS();
/* Setting up the timer tick is hardware specific and thus in the
portable interface. */
-
if (xPortStartScheduler() != pdFALSE)
{
/* Should not reach here as if the scheduler is running the
diff --git a/third-party/freertos/timers.c b/third-party/freertos/timers.c
index a6df4c48f0b6e422fe6ca024fb601df32d60cb11..ab2f10697d806332cbf44bb174b6e442e247cef2 100644
--- a/third-party/freertos/timers.c
+++ b/third-party/freertos/timers.c
@@ -504,7 +504,7 @@ static void prvTimerTask(void *pvParameters)
/* Just to avoid compiler warnings. */
(void)pvParameters;
-
+
#if (configUSE_DAEMON_TASK_STARTUP_HOOK == 1)
{
extern void vApplicationDaemonTaskStartupHook(void);
diff --git a/third-party/lwip-2.1.2/Kconfig b/third-party/lwip-2.1.2/Kconfig
index 55d80f8a3f5755292ed9719e7c27d974a39649d2..936a7e74b8c4a14f8a438d54b15c88561899a1e3 100644
--- a/third-party/lwip-2.1.2/Kconfig
+++ b/third-party/lwip-2.1.2/Kconfig
@@ -7,7 +7,7 @@ menu "LWIP Configuration"
config LWIP_F_GMAC
select USE_ETH
- select ENABLE_F_GMAC
+ select ENABLE_FGMAC
bool "F_GMAC"
endchoice # LWIP_GMAC_CTRL_TYPE
diff --git a/third-party/lwip-2.1.2/ports/f_gmac/ethernetif.c b/third-party/lwip-2.1.2/ports/f_gmac/ethernetif.c
index 1a7884ec034d741e0b2f3d39d0d3f089db22cfb1..b6bcc95cdb035f545860132e4739918e33e6e2c7 100644
--- a/third-party/lwip-2.1.2/ports/f_gmac/ethernetif.c
+++ b/third-party/lwip-2.1.2/ports/f_gmac/ethernetif.c
@@ -43,11 +43,12 @@
#include "parameters.h"
#include "ft_os_gmac.h"
-#include "gmac.h"
-#include "gmac_hw.h"
-#include "phy_common.h"
+#include "fgmac.h"
+#include "fgmac_hw.h"
+#include "fgmac_phy.h"
#include "ft_assert.h"
+#include "interrupt.h"
#ifndef SDK_CONFIG_H__
#error "Please include sdkconfig.h first"
@@ -57,8 +58,7 @@
#error "Please enable system tick by CONFIG_USE_SYS_TICK first"
#endif
#include "generic_timer.h"
-#include "gmac.h"
-#include "gmac_dma.h"
+#include "fgmac.h"
#include "ft_debug.h"
/* The time to block waiting for input. */
@@ -77,6 +77,8 @@
#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__)
+extern FError FGmacWritePhyReg(FGmacPhy *instance_p, u16 phy_reg, u32 phy_reg_val);
+extern FError FGmacReadPhyReg(FGmacPhy *instance_p, u16 phy_reg, u32 *phy_reg_val_p);
/**
* Helper struct to hold private data used to operate your ethernet interface.
@@ -86,52 +88,35 @@
*/
struct ethernetif {
struct eth_addr *ethaddr;
- GmacCtrl *ethctrl;
+ FGmac *ethctrl;
};
+static FGmac gctrl; /* huge size ctrl block */
+static FGmacPhy phy;
-static GmacCtrl gctrl; /* huge size ctrl block */
static struct ethernetif netifctrl;
/* align buf and descriptor by 128 */
-static u8 txBuf[GMAC_TX_DESCNUM * GMAC_MAX_PACKET_SIZE] __aligned(GMAC_DMA_MIN_ALIGN);
-static u8 rxBuf[GMAC_RX_DESCNUM * GMAC_MAX_PACKET_SIZE] __aligned(GMAC_DMA_MIN_ALIGN);
-static GmacDmaDesc txDesc[GMAC_TX_DESCNUM] __aligned(GMAC_DMA_MIN_ALIGN);
-static GmacDmaDesc rxDesc[GMAC_RX_DESCNUM] __aligned(GMAC_DMA_MIN_ALIGN);
+static u8 tx_buf[GMAC_TX_DESCNUM * GMAC_MAX_PACKET_SIZE] __aligned(GMAC_DMA_MIN_ALIGN);
+static u8 rx_buf[GMAC_RX_DESCNUM * GMAC_MAX_PACKET_SIZE] __aligned(GMAC_DMA_MIN_ALIGN);
+static FGmacDmaDesc tx_desc[GMAC_TX_DESCNUM] __aligned(GMAC_DMA_MIN_ALIGN);
+static FGmacDmaDesc rx_desc[GMAC_RX_DESCNUM] __aligned(GMAC_DMA_MIN_ALIGN);
/**
* @name: eth_ctrl_init
* @msg: config gmac and initialization
* @return {*}
- * @param {GmacCtrl} *pctrl
+ * @param {FGmac} *pctrl
*/
-static u32 eth_ctrl_init(GmacCtrl *pctrl)
+u32 eth_ctrl_init(FGmac *pctrl)
{
LWIP_ASSERT("pctrl != NULL", (pctrl != NULL));
- u32 ret = GMAC_SUCCESS;
-
- memset(pctrl, 0U, sizeof(GmacCtrl));
- ret = GmacCfgInitialize(pctrl, GmacLookupConfig(GMAC_INSTANCE_0));
- LWIP_ERROR("eth_ctrl_init: init cfg failed\n", (GMAC_SUCCESS == ret), return ERR_IF);
-
- ret = GmacHwInitialize(pctrl);
- LWIP_ERROR("eth_ctrl_init: init hardware failed\n", (GMAC_SUCCESS == ret), return ERR_IF);
-
- ret |= GmacDmaInitRxDescRing(pctrl, &rxDesc[0], &rxBuf[0],
- GMAC_MAX_PACKET_SIZE, GMAC_RX_DESCNUM);
- ret |= GmacDmaInitTxDescRing(pctrl, &txDesc[0], &txBuf[0],
- GMAC_MAX_PACKET_SIZE, GMAC_TX_DESCNUM);
- LWIP_ERROR("eth_ctrl_init: init hardware failed\n", (GMAC_SUCCESS == ret), return ERR_IF);
-
- ret = GmacIntrInit(pctrl);
- LWIP_ERROR("eth_ctrl_init: init gmac intrrupt failed\n", (GMAC_SUCCESS == ret), return ERR_IF);
-
+ u32 ret = FGMAC_SUCCESS;
return ret;
}
void ethernet_link_thread(void *argument)
{
-
EventBits_t ev;
FtOsGmac *os_gmac_ptr = (FtOsGmac *)argument;
struct netif *netif = &os_gmac_ptr->netif_object;
@@ -140,16 +125,12 @@ void ethernet_link_thread(void *argument)
for (;;)
{
- // printf("line=%d, ev=%#x, Flg=%d \r\n", __LINE__, ev, flag);
ev = xEventGroupWaitBits(os_gmac_ptr->s_status_event,
FT_NETIF_LINKUP | FT_NETIF_DOWN,
pdTRUE, pdFALSE, portMAX_DELAY);
- printf("line=%d, ev=%#x, Flg=%d \r\n", __LINE__, ev, flag);
-
if (ev & FT_NETIF_DOWN)
{
- // Ft_Os_Gmac_Stop(Os_GmacPtr);
netif_set_link_down(netif);
netif_set_down(netif);
last_status = FT_NETIF_DOWN;
@@ -163,12 +144,10 @@ void ethernet_link_thread(void *argument)
}
else
{
- ETHNETIF_DEBUG_I(" EventGroup is error \r\n");
+ ETHNETIF_DEBUG_I("EventGroup is error \r\n");
FT_ASSERTVOIDALWAYS();
}
- printf("ev=%#x, Flg=%d \r\n", ev, flag);
-
if (flag)
{
flag = 0;
@@ -192,9 +171,7 @@ void GmacReceiveCallBack(void *args)
{
FtOsGmac *os_gmac_ptr;
os_gmac_ptr = (FtOsGmac *)args;
- //ETHNETIF_DEBUG_E(" Gmac_ReceiveCallBack \r\n");
xSemaphoreGiveFromISR(os_gmac_ptr->s_semaphore, 0);
-
}
@@ -237,34 +214,36 @@ static void low_level_init(struct netif *netif)
{
u32 reg_value = 0;
LWIP_ASSERT("netif != NULL", (netif != NULL));
- u32 ret = GMAC_SUCCESS;
-
- GmacCtrl *p_ctrl;
-
+ u32 ret = FGMAC_SUCCESS;
+ FGmacMacAddr mac_addr;
+ FGmac *p_ctrl;
FtOsGmac *os_gmac_ptr;
os_gmac_ptr = container_of(netif, FtOsGmac, netif_object);
- // GmacCtrl *p_ctrl;
p_ctrl = &os_gmac_ptr->gmac;
/* Init Gmac */
- FtOsGmacInit(os_gmac_ptr);
+ FtOsGmacInit(os_gmac_ptr, &phy);
- /* Set Receive Callback */
- GmacRegisterEvtHandler(p_ctrl, GMAC_RX_COMPLETE_EVT, GmacReceiveCallBack);
+ /* Set Receive Callback */
+ FGmacRegisterEvtHandler(p_ctrl, FGMAC_RX_COMPLETE_EVT, GmacReceiveCallBack);
#if LWIP_ARP || LWIP_ETHERNET
/* set MAC hardware address length */
netif->hwaddr_len = ETH_HWADDR_LEN;
+ /* set MAC hardware address */
+ memset(mac_addr, 0, sizeof(mac_addr));
+ FGmacGetMacAddr(os_gmac_ptr->gmac.config.base_addr, mac_addr);
+
/* set MAC hardware address */
- netif->hwaddr[0] = p_ctrl->config.macAddr[0];
- netif->hwaddr[1] = p_ctrl->config.macAddr[1];
- netif->hwaddr[2] = p_ctrl->config.macAddr[2];
- netif->hwaddr[3] = p_ctrl->config.macAddr[3];
- netif->hwaddr[4] = p_ctrl->config.macAddr[4];
- netif->hwaddr[5] = p_ctrl->config.macAddr[5];
+ netif->hwaddr[0] = mac_addr[0];
+ netif->hwaddr[1] = mac_addr[1];
+ netif->hwaddr[2] = mac_addr[2];
+ netif->hwaddr[3] = mac_addr[3];
+ netif->hwaddr[4] = mac_addr[4];
+ netif->hwaddr[5] = mac_addr[5];
/* maximum transfer unit */
netif->mtu = GMAC_MTU;
@@ -284,22 +263,22 @@ static void low_level_init(struct netif *netif)
os_gmac_ptr, os_gmac_ptr->config.mac_input_thread.priority,
&os_gmac_ptr->config.mac_input_thread.thread_handle) != pdPASS)
{
- ETHNETIF_DEBUG_I("xTaskCreate is Error %s\r\n", os_gmac_ptr->config.mac_input_thread.thread_name);
- FT_ASSERTVOIDALWAYS();
+ ETHNETIF_DEBUG_I("xTaskCreate is Error %s\r\n", os_gmac_ptr->config.mac_input_thread.thread_name);
+ FT_ASSERTVOIDALWAYS();
}
/* Enable MAC and DMA transmission and reception */
FtOsGmacStart(os_gmac_ptr);
/* Read Register Configuration */
- GmacPhyReadReg(p_ctrl, PHY_INTERRUPT_ENABLE_OFFSET, ®_value);
+ FGmacReadPhyReg(&phy, PHY_INTERRUPT_ENABLE_OFFSET, ®_value);
reg_value |= (PHY_INTERRUPT_ENABLE_LINK_FAIL);
/* Enable Interrupt on change of link status */
- GmacPhyWriteReg(p_ctrl, PHY_INTERRUPT_ENABLE_OFFSET, reg_value);
+ FGmacWritePhyReg(&phy, PHY_INTERRUPT_ENABLE_OFFSET, reg_value);
/* Read Register Configuration */
- GmacPhyReadReg(p_ctrl, PHY_INTERRUPT_ENABLE_OFFSET, ®_value);
+ FGmacReadPhyReg(&phy, PHY_INTERRUPT_ENABLE_OFFSET, ®_value);
#endif /* LWIP_ARP || LWIP_ETHERNET */
@@ -334,18 +313,18 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
err_t errval;
struct pbuf *q;
u8 *buffer = NULL;
- volatile GmacDmaDesc *dma_tx_desc;
+ volatile FGmacDmaDesc *dma_tx_desc;
u32 frame_length = 0;
u32 buffer_offset = 0;
u32 bytes_left_to_copy = 0;
u32 pay_load_offset = 0;
- GmacCtrl *gmac;
+ FGmac *gmac;
FtOsGmac *os_gmac;
os_gmac = (FtOsGmac *)container_of(netif, FtOsGmac, netif_object);
gmac = &os_gmac->gmac;
- dma_tx_desc = &gmac->txDesc[gmac->txRing.descBufIdx];
- buffer = (u8 *)(intptr)(dma_tx_desc->buf1Addr);
+ dma_tx_desc = &gmac->tx_desc[gmac->tx_ring.desc_buf_idx];
+ buffer = (u8 *)(intptr)(dma_tx_desc->buf_addr);
if (buffer == NULL)
{
@@ -360,7 +339,7 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
for (q = p; q != NULL; q = q->next)
{
/* Is this buffer available? If not, goto error */
- if ((dma_tx_desc->status & GMAC_DMA_TDES0_OWN) != 0)
+ if ((dma_tx_desc->status & FGMAC_DMA_TDES0_OWN) != 0)
{
errval = ERR_USE;
ETHNETIF_DEBUG_I("error errval = ERR_USE; \r\n");
@@ -377,19 +356,19 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
/* Copy data to Tx buffer*/
memcpy((u8 *)((u8 *)buffer + buffer_offset), (u8 *)((u8 *)q->payload + pay_load_offset), (GMAC_MAX_PACKET_SIZE - buffer_offset));
- GMAC_DMA_INC_DESC(gmac->txRing.descBufIdx, gmac->txRing.descMaxNum);
+ FGMAC_DMA_INC_DESC(gmac->tx_ring.desc_buf_idx, gmac->tx_ring.desc_max_num);
/* Point to next descriptor */
- dma_tx_desc = &gmac->txDesc[gmac->txRing.descBufIdx];
+ dma_tx_desc = &gmac->tx_desc[gmac->tx_ring.desc_buf_idx];
/* Check if the Bufferis available */
- if ((dma_tx_desc->status & GMAC_DMA_TDES0_OWN) != (u32)0)
+ if ((dma_tx_desc->status & FGMAC_DMA_TDES0_OWN) != (u32)0)
{
errval = ERR_USE;
ETHNETIF_DEBUG_I("Check if the Bufferis available \r\n");
goto error;
}
- buffer = (u8 *)(intptr)(dma_tx_desc->buf1Addr);
+ buffer = (u8 *)(intptr)(dma_tx_desc->buf_addr);
bytes_left_to_copy = bytes_left_to_copy - (GMAC_MAX_PACKET_SIZE - buffer_offset);
pay_load_offset = pay_load_offset + (GMAC_MAX_PACKET_SIZE - buffer_offset);
frame_length = frame_length + (GMAC_MAX_PACKET_SIZE - buffer_offset);
@@ -399,24 +378,25 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p)
{
ETHNETIF_DEBUG_I(" error Buffer is 0 \r\n");
return ERR_VAL;
- }
+ }
}
/* Copy the remaining bytes */
memcpy((u8 *)((u8 *)buffer + buffer_offset), (u8 *)((u8 *)q->payload + pay_load_offset), bytes_left_to_copy);
buffer_offset = buffer_offset + bytes_left_to_copy;
frame_length = frame_length + bytes_left_to_copy;
- GMAC_DMA_INC_DESC(gmac->txRing.descBufIdx, gmac->txRing.descMaxNum);
+ FGMAC_DMA_INC_DESC(gmac->tx_ring.desc_buf_idx, gmac->tx_ring.desc_max_num);
}
#if ETH_PAD_SIZE
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif
- GmacDmaTransFrame(gmac, frame_length);
+ FGmacSendFrame(gmac, frame_length);
error:
- GmacDmaResumeUnderflow(gmac);
+ FGmacResmuDmaUnderflow(gmac->config.base_addr);
+
return errval;
}
@@ -437,27 +417,27 @@ static struct pbuf *low_level_input(struct netif *netif)
struct pbuf *q = NULL;
u16 length = 0;
u8 *buffer;
- volatile GmacDmaDesc *dma_rx_desc;
+ volatile FGmacDmaDesc *dma_rx_desc;
u32 buffer_offset = 0;
u32 pay_load_offset = 0;
u32 bytes_left_to_copy = 0;
u32 desc_buffer_index; /* For Current Desc buffer buf position */
FtOsGmac *os_gmac;
- GmacCtrl *gmac;
+ FGmac *gmac;
os_gmac = (FtOsGmac *)container_of(netif, FtOsGmac, netif_object);
gmac = &os_gmac->gmac;
/* get received frame */
- if (GmacRingGetReceivedFrameIT(gmac) != FT_SUCCESS)
+ if (FGmacRecvFrame(gmac) != FT_SUCCESS)
{
return NULL;
}
- desc_buffer_index = gmac->rxRing.descBufIdx;
- length = (gmac->rxDesc[desc_buffer_index].status & GMAC_DMA_RDES0_FRAME_LEN_MASK) >> GMAC_DMA_RDES0_FRAME_LEN_SHIFT;
- buffer = (u8 *)(intptr)(gmac->rxDesc[desc_buffer_index].buf1Addr);
+ desc_buffer_index = gmac->rx_ring.desc_buf_idx;
+ length = (gmac->rx_desc[desc_buffer_index].status & FGMAC_DMA_RDES0_FRAME_LEN_MASK) >> FGMAC_DMA_RDES0_FRAME_LEN_SHIFT;
+ buffer = (u8 *)(intptr)(gmac->rx_desc[desc_buffer_index].buf_addr);
#if ETH_PAD_SIZE
@@ -479,7 +459,7 @@ static struct pbuf *low_level_input(struct netif *netif)
#if ETH_PAD_SIZE
pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
#endif
- dma_rx_desc = &gmac->rxDesc[desc_buffer_index];
+ dma_rx_desc = &gmac->rx_desc[desc_buffer_index];
buffer_offset = 0;
for (q = p; q != NULL; q = q->next)
{
@@ -492,14 +472,14 @@ static struct pbuf *low_level_input(struct netif *netif)
memcpy((u8 *)((u8 *)q->payload + pay_load_offset), (u8 *)((u8 *)buffer + buffer_offset), (GMAC_MAX_PACKET_SIZE - buffer_offset));
/* Point to next descriptor */
- GMAC_DMA_INC_DESC(desc_buffer_index, gmac->rxRing.descMaxNum);
- if (desc_buffer_index == gmac->rxRing.descIdx)
+ FGMAC_DMA_INC_DESC(desc_buffer_index, gmac->rx_ring.desc_max_num);
+ if (desc_buffer_index == gmac->rx_ring.desc_idx)
{
break;
}
- dma_rx_desc = &gmac->rxDesc[desc_buffer_index];
- buffer = (u8 *)(intptr)(dma_rx_desc->buf1Addr);
+ dma_rx_desc = &gmac->rx_desc[desc_buffer_index];
+ buffer = (u8 *)(intptr)(dma_rx_desc->buf_addr);
bytes_left_to_copy = bytes_left_to_copy - (GMAC_MAX_PACKET_SIZE - buffer_offset);
pay_load_offset = pay_load_offset + (GMAC_MAX_PACKET_SIZE - buffer_offset);
@@ -520,19 +500,18 @@ static struct pbuf *low_level_input(struct netif *netif)
/* Release descriptors to DMA */
/* Point to first descriptor */
- dma_rx_desc = &gmac->rxDesc[desc_buffer_index];
+ dma_rx_desc = &gmac->rx_desc[desc_buffer_index];
/* Set Own bit in Rx descriptors: gives the buffers back to DMA */
- for (desc_buffer_index = gmac->rxRing.descBufIdx; desc_buffer_index != gmac->rxRing.descIdx; GMAC_DMA_INC_DESC(desc_buffer_index, gmac->rxRing.descMaxNum))
+ for (desc_buffer_index = gmac->rx_ring.desc_buf_idx; desc_buffer_index != gmac->rx_ring.desc_idx; FGMAC_DMA_INC_DESC(desc_buffer_index, gmac->rx_ring.desc_max_num))
{
- dma_rx_desc->status |= GMAC_DMA_RDES0_OWN;
- dma_rx_desc = &gmac->rxDesc[desc_buffer_index];
+ dma_rx_desc->status |= FGMAC_DMA_RDES0_OWN;
+ dma_rx_desc = &gmac->rx_desc[desc_buffer_index];
}
/* Sync index */
- gmac->rxRing.descBufIdx = gmac->rxRing.descIdx;
-
- GmacDmaResumeRecv(gmac);
+ gmac->rx_ring.desc_buf_idx = gmac->rx_ring.desc_idx;
+ FGmacResumeDmaRecv(gmac->config.base_addr);
return p;
}
@@ -557,6 +536,7 @@ void ethernetif_input(void const *argument)
if (xSemaphoreTake(os_gmac_ptr->s_semaphore, TIME_WAITING_FOR_INPUT) == pdTRUE)
{
+
do
{
LOCK_TCPIP_CORE();
@@ -594,12 +574,7 @@ static err_t low_level_output_arp_off(struct netif *netif, struct pbuf *q, const
err_t errval;
errval = ERR_OK;
-/* USER CODE BEGIN 5 */
-
-/* USER CODE END 5 */
-
return errval;
-
}
#endif /* LWIP_ARP */
@@ -708,9 +683,9 @@ sio_fd_t sio_open(u8_t devnum)
sio_fd_t sd;
(void)devnum;
- sd = 0; // dummy code
+ sd = 0;
- return sd;
+ return sd;
}
/**
@@ -731,7 +706,7 @@ u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len)
(void)data;
(void)fd;
- recved_bytes = 0; // dummy code
+ recved_bytes = 0;
return recved_bytes;
}
diff --git a/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.c b/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.c
index 5842cc9ff062a0cf2009f9c694dde95e04841e0e..68b5ba5dffaaef997ba08a9ccfbcc971f8379080 100644
--- a/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.c
+++ b/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.c
@@ -15,12 +15,11 @@
#include
#include
#include
-
#include
#include
#include "ft_os_gmac.h"
-#include "gmac.h"
+#include "fgmac.h"
#include "ft_assert.h"
#include "ft_io.h"
#include "ft_assert.h"
@@ -37,6 +36,188 @@
#define FT_OS_GMACOBJECT_READLY 0x58
+static boolean rx_data_flag = FALSE;
+
+static void EthLinkPhyStatusChecker(void *param)
+{
+ FT_ASSERTVOID(param != NULL);
+ FGmac *instance_p = (FGmac *)param;
+ uintptr base_addr = instance_p->config.base_addr;
+
+ u32 phy_status = FGMAC_READ_REG32(base_addr, FGMAC_MAC_PHY_STATUS);
+
+ if (FGMAC_RGSMIIIS_LNKSTS_UP == (FGMAC_RGSMIIIS_LNKSTS & phy_status))
+ {
+ OS_MAC_DEBUG_I("link is up");
+ }
+ else
+ {
+ OS_MAC_DEBUG_I("link is down");
+ }
+
+ return;
+}
+
+static void EthLinkDmaErrChecker(void *param)
+{
+ FT_ASSERTVOID(param != NULL);
+ FGmac *instance_p = (FGmac *)param;
+ uintptr base_addr = instance_p->config.base_addr;
+
+ u32 reg_val = FGMAC_READ_REG32(base_addr, FGMAC_DMA_INTR_OFFSET);
+ u32 status = FGMAC_READ_REG32(base_addr, FGMAC_DMA_STATUS_OFFSET);
+
+ if ((FGMAC_DMA_STATUS_TPS & status) && (FGMAC_DMA_INTR_ENA_TSE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Transmit process stopped");
+ }
+
+ if ((FGMAC_DMA_STATUS_TU & status) && (FGMAC_DMA_INTR_ENA_TUE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Transmit Buffer Unavailable");
+ }
+
+ if ((FGMAC_DMA_STATUS_TJT & status) && (FGMAC_DMA_INTR_ENA_THE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Transmit Jabber Timeout");
+ }
+
+ if ((FGMAC_DMA_STATUS_OVF & status) && (FGMAC_DMA_INTR_ENA_OVE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Receive Overflow");
+ }
+
+ if ((FGMAC_DMA_STATUS_UNF & status) && (FGMAC_DMA_INTR_ENA_UNE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Transmit Underflow");
+ }
+
+ if ((FGMAC_DMA_STATUS_RU & status) && (FGMAC_DMA_INTR_ENA_RUE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Receive Buffer Unavailable");
+ }
+
+ if ((FGMAC_DMA_STATUS_RPS & status) && (FGMAC_DMA_INTR_ENA_RSE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Receive Process Stopped");
+ }
+
+ if ((FGMAC_DMA_STATUS_RWT & status) && (FGMAC_DMA_INTR_ENA_RWE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Receive Watchdog Timeout");
+ }
+
+ if ((FGMAC_DMA_STATUS_ETI & status) && (FGMAC_DMA_INTR_ENA_ETE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Early Transmit Interrupt");
+ }
+
+ if ((FGMAC_DMA_STATUS_FBI & status) && (FGMAC_DMA_INTR_ENA_FBE & reg_val))
+ {
+ OS_MAC_DEBUG_E("Fatal Bus Error");
+ }
+
+ return;
+}
+
+void EthLinkStatusChecker(void *param)
+{
+ FT_ASSERTVOID(param);
+ FGmac *instance_p = (FGmac *)param;
+ uintptr base_addr = instance_p->config.base_addr;
+ u32 status = FGMAC_READ_REG32(base_addr, FGMAC_MAC_PHY_STATUS);
+ u32 speed_status, duplex_status;
+ u32 speed, duplex;
+
+ /* Check the link status */
+ if (FGMAC_RGSMIIIS_LNKSTS_UP == (FGMAC_RGSMIIIS_LNKSTS & status))
+ {
+ speed_status = FGMAC_RGSMIIIS_SPEED & status;
+ duplex_status = FGMAC_RGSMIIIS_LNKMODE & status;
+
+ if (FGMAC_RGSMIIIS_SPEED_125MHZ == speed_status)
+ speed = FGMAC_PHY_SPEED_1000;
+ else if (FGMAC_RGSMIIIS_SPEED_25MHZ == speed_status)
+ speed = FGMAC_PHY_SPEED_100;
+ else
+ speed = FGMAC_PHY_SPEED_10;
+
+ if (FGMAC_RGSMIIIS_LNKMODE_HALF == duplex_status)
+ duplex = FGMAC_PHY_MODE_HALFDUPLEX;
+ else
+ duplex = FGMAC_PHY_MODE_FULLDUPLEX;
+
+ OS_MAC_DEBUG_I("link is up --- %d/%s",
+ speed, (FGMAC_PHY_MODE_FULLDUPLEX == duplex) ? "full" : "half");
+ }
+ else
+ {
+ OS_MAC_DEBUG_I("link is down");
+ }
+
+ (void)speed;
+ (void)duplex;
+}
+
+static void EthLinkRecvDoneCallback(void *param)
+{
+ FT_ASSERTVOID(param);
+ FGmac *instance_p = (FGmac *)param;
+
+ if (TRUE == rx_data_flag)
+ {
+ OS_MAC_DEBUG_W("last rx data has not been handled !!!");
+ }
+
+ rx_data_flag = TRUE;
+ OS_MAC_DEBUG_I("recv data");
+ return;
+}
+
+static void EthLinkTransDoneCallback(void *param)
+{
+ FT_ASSERTVOID(param);
+ FGmac *instance_p = (FGmac *)param;
+
+ FGmacResumeDmaSend(instance_p->config.base_addr);
+ OS_MAC_DEBUG_I("resume trans");
+ return;
+}
+
+int FtOsGmacSetupInterrupt(FGmac *instance_p)
+{
+ LWIP_ASSERT("instance_p != NULL", (instance_p != NULL));
+ FGmacConfig *config_p = &instance_p->config;
+ uintptr base_addr = config_p->base_addr;
+ u32 irq_num = config_p->irq_num;
+ u32 irq_priority = (0x8 << 4) + 4 * 16;
+
+ /* disable all gmac & dma intr */
+ FGmacSetInterruptMask(instance_p, FGMAC_CTRL_INTR, FGMAC_ISR_MASK_ALL_BITS, FALSE);
+ FGmacSetInterruptMask(instance_p, FGMAC_DMA_INTR, FGMAC_DMA_INTR_ENA_ALL_MASK, FALSE);
+
+ InterruptSetPriority(irq_num, irq_priority);
+ InterruptInstall(irq_num, FGmacInterruptHandler, instance_p, "GMAC-IRQ");
+
+ /* register intr callback */
+ FGmacRegisterEvtHandler(instance_p, FGMAC_PHY_STATUS_EVT, EthLinkPhyStatusChecker);
+ FGmacRegisterEvtHandler(instance_p, FGMAC_DMA_ERR_EVT, EthLinkDmaErrChecker);
+ FGmacRegisterEvtHandler(instance_p, FGMAC_LINK_STATUS_EVT, EthLinkStatusChecker);
+ FGmacRegisterEvtHandler(instance_p, FGMAC_TX_COMPLETE_EVT, EthLinkTransDoneCallback);
+
+ /* umask intr */
+ InterruptUmask(irq_num);
+
+ /* enable some interrupts */
+ FGmacSetInterruptMask(instance_p, FGMAC_CTRL_INTR, FGMAC_ISR_MASK_RSIM, TRUE);
+ FGmacSetInterruptMask(instance_p, FGMAC_DMA_INTR, FGMAC_DMA_INTR_ENA_NIE | FGMAC_DMA_INTR_ENA_RIE\
+ /*FGMAC_DMA_INTR_ENA_ALL_MASK*/, TRUE);
+
+ OS_MAC_DEBUG_I("gmac setup done");
+ return 0;
+}
+
+
/**
* @name: Ft_Os_GmacMem_Create
* @msg: Initialize the Gmac TX/Rx Describe Memory 。
@@ -46,11 +227,12 @@
static u8 rx_buf[GMAC_RX_DESCNUM * GMAC_MAX_PACKET_SIZE] __attribute__((aligned(32)));
static u8 tx_buf[GMAC_TX_DESCNUM * GMAC_MAX_PACKET_SIZE] __attribute__((aligned(32)));
-static u8 tx_desc[GMAC_TX_DESCNUM * sizeof(GmacDmaDesc)] __attribute__((aligned(128)));
-static u8 rx_desc[GMAC_RX_DESCNUM * sizeof(GmacDmaDesc) + 128] __attribute__((aligned(128)));
+static u8 tx_desc[GMAC_TX_DESCNUM * sizeof(FGmacDmaDesc)] __attribute__((aligned(128)));
+static u8 rx_desc[GMAC_RX_DESCNUM * sizeof(FGmacDmaDesc) + 128] __attribute__((aligned(128)));
static void FtOsGmacMemCreate(FtOsGmac *os_gmac)
{
+ FT_ASSERTVOID(os_gmac != NULL);
os_gmac->rx_buffer = rx_buf;
if (os_gmac->rx_buffer == NULL)
{
@@ -65,28 +247,29 @@ static void FtOsGmacMemCreate(FtOsGmac *os_gmac)
FT_ASSERTVOIDALWAYS();
}
- os_gmac->gmac.txDesc = (GmacDmaDesc *)tx_desc;
- if (os_gmac->gmac.txDesc == NULL)
+ os_gmac->gmac.tx_desc = (FGmacDmaDesc *)tx_desc;
+ if (os_gmac->gmac.tx_desc == NULL)
{
- OS_MAC_DEBUG_E("txDesc Malloc is error ");
+ OS_MAC_DEBUG_E("tx_desc Malloc is error ");
FT_ASSERTVOIDALWAYS();
}
- os_gmac->gmac.rxDesc = (GmacDmaDesc *)rx_desc;
- if (os_gmac->gmac.rxDesc == NULL)
+ os_gmac->gmac.rx_desc = (FGmacDmaDesc *)rx_desc;
+ if (os_gmac->gmac.rx_desc == NULL)
{
- OS_MAC_DEBUG_E("rxDesc Malloc is error ");
+ OS_MAC_DEBUG_E("rx_desc Malloc is error ");
FT_ASSERTVOIDALWAYS();
}
#define ROUND_UP(x, align) (((long)(x) + ((long)align - 1)) & \
~((long)align - 1))
- os_gmac->gmac.rxDesc = (GmacDmaDesc *)ROUND_UP(os_gmac->gmac.rxDesc, 128);
+ os_gmac->gmac.rx_desc = (FGmacDmaDesc *)ROUND_UP(os_gmac->gmac.rx_desc, 128);
}
static void FtOsGmacMemFree(FtOsGmac *os_gmac)
{
+ FT_ASSERTVOID(os_gmac != NULL);
if (os_gmac->rx_buffer)
{
vPortFree(os_gmac->rx_buffer);
@@ -97,14 +280,14 @@ static void FtOsGmacMemFree(FtOsGmac *os_gmac)
vPortFree(os_gmac->tx_buffer);
}
- if (os_gmac->gmac.rxDesc)
+ if (os_gmac->gmac.rx_desc)
{
- vPortFree((void *)(os_gmac->gmac.rxDesc));
+ vPortFree((void *)(os_gmac->gmac.rx_desc));
}
- if (os_gmac->gmac.txDesc)
+ if (os_gmac->gmac.tx_desc)
{
- vPortFree((void *)(os_gmac->gmac.txDesc));
+ vPortFree((void *)(os_gmac->gmac.tx_desc));
}
}
@@ -131,19 +314,27 @@ void FtOsGmacObjectInit(FtOsGmac *os_gmac, FtOsGmacConfig *config)
* @param {u32} InstanceId
* @return {*}
*/
-void FtOsGmacInit(FtOsGmac *os_gmac)
+
+void FtOsGmacInit(FtOsGmac *os_gmac, FGmacPhy *phy_p)
{
- GmacCtrl *gmac;
FT_ASSERTVOID(os_gmac != NULL);
-
+ FT_ASSERTVOID(phy_p != NULL);
FT_ASSERTVOID((os_gmac->is_ready == FT_OS_GMACOBJECT_READLY));
+ FGmac *gmac;
gmac = &os_gmac->gmac;
FtOsGmacMemFree(os_gmac);
- FT_ASSERTVOID(GmacCfgInitialize(gmac, GmacLookupConfig(os_gmac->config.gmac_instance)) == FT_SUCCESS);
+
+ FT_ASSERTVOID(FGmacCfgInitialize(gmac, FGmacLookupConfig(gmac->config.instance_id)) == FT_SUCCESS);
+
FtOsGmacMemCreate(os_gmac);
+ /* initialize phy */
+ memset(phy_p, 0U, sizeof(FGmacPhy));
+ FGmacPhyLookupConfig(gmac->config.instance_id, phy_p);
+ FT_ASSERTVOID(FGmacPhyCfgInitialize(phy_p) == FT_SUCCESS);
+
/* Create a binary semaphore used for informing ethernetif of frame reception */
FT_ASSERTVOID((os_gmac->s_semaphore = xSemaphoreCreateBinary()) != NULL);
/* Create a event group used for ethernetif of status change */
@@ -156,15 +347,16 @@ void FtOsGmacInit(FtOsGmac *os_gmac)
* @param {Ft_Os_Gmac} *Os_Gmac
* @return {*}
*/
+
void FtOsGmacStart(FtOsGmac *os_gmac)
{
- GmacCtrl *gmac;
FT_ASSERTVOID(os_gmac != NULL);
FT_ASSERTVOID((os_gmac->is_ready == FT_OS_GMACOBJECT_READLY));
+
+ FGmac *gmac;
gmac = &os_gmac->gmac;
- u32 ret;
+ u32 ret = FT_SUCCESS;
- ret = GmacHwInitialize(gmac);
if (FT_SUCCESS != ret)
{
OS_MAC_DEBUG_E("gmac return err code %d\r\n", ret);
@@ -172,22 +364,23 @@ void FtOsGmacStart(FtOsGmac *os_gmac)
}
/* Initialize Rx Description list : ring Mode */
- GmacDmaInitRxDescRing(gmac, (GmacDmaDesc *)(gmac->rxDesc), os_gmac->rx_buffer, GMAC_MAX_PACKET_SIZE, GMAC_RX_DESCNUM);
+ FGmacSetupRxDescRing(gmac, (FGmacDmaDesc *)(gmac->rx_desc), os_gmac->rx_buffer, GMAC_MAX_PACKET_SIZE, GMAC_RX_DESCNUM);
/* Initialize Tx Description list : ring Mode */
- GmacDmaInitTxDescRing(gmac, (GmacDmaDesc *)(gmac->txDesc), os_gmac->tx_buffer, GMAC_MAX_PACKET_SIZE, GMAC_TX_DESCNUM);
+ FGmacSetupTxDescRing(gmac, (FGmacDmaDesc *)(gmac->tx_desc), os_gmac->tx_buffer, GMAC_MAX_PACKET_SIZE, GMAC_TX_DESCNUM);
- GmacDmaStart(gmac);
+ /* enable gmac */
+ FGmacStartTrans(gmac);
/* Gmac interrupt init */
- GmacIntrInit(gmac);
+ FtOsGmacSetupInterrupt(gmac);
return;
}
void FtOsGmacStop(FtOsGmac *os_gmac)
{
- GmacCtrl *gmac;
+ FGmac *gmac;
FT_ASSERTVOID(os_gmac != NULL);
FT_ASSERTVOID((os_gmac->is_ready == FT_OS_GMACOBJECT_READLY));
diff --git a/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.h b/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.h
index 0143f1f2a3e576e36f85e995d45b6077efb1e176..aade7877eeee6823038c133dcab375858b136421 100644
--- a/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.h
+++ b/third-party/lwip-2.1.2/ports/f_gmac/ft_os_gmac.h
@@ -19,7 +19,9 @@
#include
#include
-#include "gmac.h"
+#include "fgmac.h"
+#include "fgmac_hw.h"
+#include "fgmac_phy.h"
#include "parameters.h"
#include "lwip/netif.h"
@@ -36,6 +38,11 @@
#define GMAC_RX_DESCNUM 1024U
#define GMAC_TX_DESCNUM 1024U
+#define GMAC_MTU 1500U
+
+/* Common PHY Registers (AR8035) */
+#define PHY_INTERRUPT_ENABLE_OFFSET ((u16)0x12)
+#define PHY_INTERRUPT_ENABLE_LINK_FAIL 0x00000800U /* Link fail interrupt, 0 Interrupt disable , 1 Interrupt enable */
struct Ipv4Address
{
@@ -63,7 +70,7 @@ typedef struct
typedef struct
{
- GmacCtrl gmac;
+ FGmac gmac;
struct netif netif_object;
FtOsGmacConfig config;
u8 *rx_buffer; /* Buffer for RxDesc */
@@ -73,9 +80,9 @@ typedef struct
EventGroupHandle_t s_status_event; /* Event Group to show netif's status ,follow FT_NETIF_XX*/
} FtOsGmac;
void FtOsGmacObjectInit(FtOsGmac *os_gmac, FtOsGmacConfig *config);
-void FtOsGmacInit(FtOsGmac *os_gmac);
+void FtOsGmacInit(FtOsGmac *os_gmac, FGmacPhy *phy_p);
void FtOsGmacStart(FtOsGmac *os_gmac);
void FtOsGmacStop(FtOsGmac *os_gmac);
-
+int FtOsGmacSetupInterrupt(FGmac *instance_p);
#endif // ! FT_OS_GMAC_H
diff --git a/third-party/third-party.mk b/third-party/third-party.mk
index 0f6ea5e27c12d6b1b732098c2dd59b979937fa17..e7bb1837ab267e83c3e35ba33227aa7c530196ba 100644
--- a/third-party/third-party.mk
+++ b/third-party/third-party.mk
@@ -37,7 +37,7 @@ INC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include \
$(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/include/netif
# src code of ports
-ifdef CONFIG_ENABLE_F_GMAC
+ifdef CONFIG_ENABLE_FGMAC
INC_DIR += $(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/f_gmac \
$(THIRD_PARTY_CUR_DIR)/lwip-2.1.2/ports/f_gmac/arch