mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-07 00:59:00 +08:00
[bsp] phytium e2000 update (#7900)
Co-authored-by: zhugengyu <zhugengyu@phytium.com.cn>
This commit is contained in:
@@ -285,6 +285,7 @@ jobs:
|
||||
- "raspberry-pi/raspi3-64"
|
||||
- "raspberry-pi/raspi4-64"
|
||||
- "rockchip/rk3568"
|
||||
- "phytium/aarch64"
|
||||
- RTT_BSP: "riscv-none"
|
||||
RTT_TOOL_CHAIN: "sourcery-riscv-none-embed"
|
||||
SUB_RTT_BSP:
|
||||
|
||||
@@ -210,8 +210,8 @@ jobs:
|
||||
- {RTT_BSP_NAME: "nuclei_gd32vf103_rvstar", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "nuclei/gd32vf103_rvstar"}
|
||||
#- {RTT_BSP_NAME: "nuclei_nuclei_fpga_eval", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "nuclei/nuclei_fpga_eval"} #riscv-nuclei-elf-gcc toolchain不支持
|
||||
#- {RTT_BSP_NAME: "nv32f100x", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "nv32f100x"} #编译错误
|
||||
#- {RTT_BSP_NAME: "phytium_aarch32", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "phytium/aarch32"} #编译错误
|
||||
# - {RTT_BSP_NAME: "phytium_aarch64", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "phytium/aarch64"} #编译错误
|
||||
# - {RTT_BSP_NAME: "phytium_aarch32", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "phytium/aarch32"}
|
||||
- {RTT_BSP_NAME: "phytium_aarch64", RTT_TOOL_CHAIN: "sourcery-aarch64", RTT_BSP: "phytium/aarch64"}
|
||||
#- {RTT_BSP_NAME: "pic32ethernet", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "pic32ethernet"} #编译错误
|
||||
- {RTT_BSP_NAME: "qemu-vexpress-a9", RTT_TOOL_CHAIN: "sourcery-arm", RTT_BSP: "qemu-vexpress-a9"}
|
||||
- {RTT_BSP_NAME: "qemu-virt64-aarch64", RTT_TOOL_CHAIN: "sourcery-aarch64", RTT_BSP: "qemu-virt64-aarch64"}
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
/aarch32/tools/ci.py
|
||||
/aarch32/tools/get_toolchain.py
|
||||
/aarch32/smart-env.sh
|
||||
/aarch32/smart-env.bat
|
||||
/aarch64/tools/gnu_gcc/*
|
||||
/aarch64/tools/ci.py
|
||||
/aarch64/tools/get_toolchain.py
|
||||
/aarch64/smart-env.sh
|
||||
**/**/makefile
|
||||
/aarch64/smart-env.bat
|
||||
**/**/makefile
|
||||
/libraries/tests/*
|
||||
+178
-34
File diff suppressed because it is too large
Load Diff
@@ -49,6 +49,4 @@ menu "Standalone Setting"
|
||||
source "$STANDALONE_DIR/board/Kconfig"
|
||||
source "$STANDALONE_DIR/drivers/Kconfig"
|
||||
source "$STANDALONE_DIR/common/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
@@ -113,6 +113,12 @@ rtthread_a32.map
|
||||
|
||||
- 可以用串口通过 XMODEM 协议将 bin/elf 文件上传到开发板,然后启动,
|
||||
|
||||
- 如果使用 SD-1 控制器
|
||||
|
||||
```
|
||||
mw.l 0x32b31178 0x1f
|
||||
```
|
||||
|
||||
- 首先在 Phytium 开发板上输入,上传 bin 文件
|
||||
|
||||
```
|
||||
|
||||
@@ -8,56 +8,89 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023-04-27 huanghe first version
|
||||
* 2023-07-14 liqiaozhong add SD file sys mount func
|
||||
*
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#ifdef RT_USING_DFS_RAMFS
|
||||
#include <dfs_fs.h>
|
||||
#if defined(RT_USING_DFS)
|
||||
#include <rtdbg.h>
|
||||
|
||||
extern struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size);
|
||||
|
||||
int mnt_init(void)
|
||||
{
|
||||
rt_uint8_t *pool = RT_NULL;
|
||||
rt_size_t size = 8*1024*1024;
|
||||
|
||||
pool = rt_malloc(size);
|
||||
if (pool == RT_NULL)
|
||||
return 0;
|
||||
|
||||
if (dfs_mount(RT_NULL, "/", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0)
|
||||
rt_kprintf("RAM file system initializated!\n");
|
||||
else
|
||||
rt_kprintf("RAM file system initializate failed!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
INIT_ENV_EXPORT(mnt_init);
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_SDCARD_FATFS
|
||||
#include <dfs_fs.h>
|
||||
#include <dfs_file.h>
|
||||
|
||||
#define DBG_TAG "app.filesystem"
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifdef BSP_USING_SDCARD_FATFS
|
||||
#define SD_DEIVCE_NAME "sd"
|
||||
static int filesystem_mount(void)
|
||||
{
|
||||
while(rt_device_find("sd0") == RT_NULL)
|
||||
while (rt_device_find(SD_DEIVCE_NAME) == RT_NULL)
|
||||
{
|
||||
rt_thread_mdelay(1);
|
||||
}
|
||||
|
||||
int ret = dfs_mount("sd0", "/", "elm", 0, 0);
|
||||
if (ret != 0)
|
||||
if (dfs_mount(SD_DEIVCE_NAME, "/", "elm", 0, 0) == 0)
|
||||
{
|
||||
rt_kprintf("ret: %d\n",ret);
|
||||
LOG_E("sd0 mount to '/' failed!");
|
||||
return ret;
|
||||
LOG_I("file system initialization done!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_W("[sd] File System on SD initialization failed!");
|
||||
LOG_W("[sd] Try to format and re-mount...");
|
||||
if (dfs_mkfs("elm", SD_DEIVCE_NAME) == 0)
|
||||
{
|
||||
if (dfs_mount(SD_DEIVCE_NAME, "/", "elm", 0, 0) == 0)
|
||||
{
|
||||
LOG_I("[sd] File System on SD initialized!");
|
||||
}
|
||||
}
|
||||
LOG_E("[sd] File System on SD initialization failed!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mkdir("/ram", 0x777);
|
||||
|
||||
#ifdef RT_USING_DFS_RAMFS
|
||||
extern struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size);
|
||||
|
||||
rt_uint8_t *pool = RT_NULL;
|
||||
rt_size_t size = 8 * 1024 * 1024;
|
||||
|
||||
pool = rt_malloc(size);
|
||||
if (pool == RT_NULL)
|
||||
LOG_E("Malloc fail!");
|
||||
|
||||
if (dfs_mount(RT_NULL, "/ram", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0)
|
||||
LOG_I("RAM file system initializated!");
|
||||
else
|
||||
LOG_E("RAM file system initializate failed!");
|
||||
#endif
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_ENV_EXPORT(filesystem_mount);
|
||||
|
||||
#else
|
||||
static int filesystem_mount(void)
|
||||
{
|
||||
#ifdef RT_USING_DFS_RAMFS
|
||||
extern struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size);
|
||||
|
||||
rt_uint8_t *pool = RT_NULL;
|
||||
rt_size_t size = 8 * 1024 * 1024;
|
||||
|
||||
pool = rt_malloc(size);
|
||||
if (pool == RT_NULL)
|
||||
LOG_E("Malloc fail!");
|
||||
|
||||
if (dfs_mount(RT_NULL, "/", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0)
|
||||
LOG_I("RAM file system initializated!");
|
||||
else
|
||||
LOG_E("RAM file system initializate failed!");
|
||||
#endif
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_ENV_EXPORT(filesystem_mount);
|
||||
#endif
|
||||
#endif // #ifdef BSP_USING_SDCARD_FATFS
|
||||
#endif // #if defined(RT_USING_DFS)
|
||||
@@ -7,7 +7,8 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-10-26 huanghe first commit
|
||||
* 2022-10-26 huanghe first commit
|
||||
* 2023-07-27 zhugengyu flush cache in aarch64-el2
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -18,8 +19,75 @@
|
||||
|
||||
.section .boot,"ax"
|
||||
|
||||
/* switch from aarch64-el2 to aarch32-el1 */
|
||||
_boot:
|
||||
/* hard code aarch64 instruction to flush dcache, refer to rt-thread __asm_flush_dcache_all */
|
||||
.long 0xd2800000 /* mov x0, #0x0 // clean and invaildate d-cache */
|
||||
.long 0x1400001a /* b <InvalidateFlushDcaches> */
|
||||
|
||||
InvalidateFlushDcacheLevel:
|
||||
.long 0xd37ff80c /* lsl x12, x0, #1 */
|
||||
.long 0xd51a000c /* msr csselr_el1, x12 */
|
||||
.long 0xd5033fdf /* isb */
|
||||
.long 0xd5390006 /* mrs x6, ccsidr_el1 */
|
||||
.long 0x924008c2 /* and x2, x6, #0x7 */
|
||||
.long 0x91001042 /* add x2, x2, #0x4 */
|
||||
.long 0xd2807fe3 /* mov x3, #0x3ff */
|
||||
.long 0x8a460c63 /* and x3, x3, x6, lsr #3 */
|
||||
.long 0x5ac01065 /* clz w5, w3 */
|
||||
.long 0xd28fffe4 /* mov x4, #0x7fff */
|
||||
.long 0x8a463484 /* and x4, x4, x6, lsr #13 */
|
||||
|
||||
InvalidateFlushCacheSet:
|
||||
.long 0xaa0303e6 /* mov x6, x3 */
|
||||
|
||||
InvalidateFlushCacheWay:
|
||||
.long 0x9ac520c7 /* lsl x7, x6, x5 */
|
||||
.long 0xaa070189 /* orr x9, x12, x7 */
|
||||
.long 0x9ac22087 /* lsl x7, x4, x2 */
|
||||
.long 0xaa070129 /* orr x9, x9, x7 */
|
||||
.long 0x36000061 /* tbz w1, #0, <InvalidateFlushCacheWay+0x1c> */
|
||||
.long 0xd5087649 /* dc isw, x9 */
|
||||
.long 0x14000002 /* b <InvalidateFlushCacheWay+0x20> */
|
||||
.long 0xd5087e49 /* dc cisw, x9 */
|
||||
.long 0xf10004c6 /* subs x6, x6, #0x1 */
|
||||
.long 0x54fffeea /* b.ge <InvalidateFlushCacheWay> */
|
||||
.long 0xf1000484 /* subs x4, x4, #0x1 */
|
||||
.long 0x54fffe8a /* b.ge <InvalidateFlushCacheSet> */
|
||||
.long 0xd65f03c0 /* ret */
|
||||
|
||||
InvalidateFlushDcaches:
|
||||
.long 0xaa0003e1 /* mov x1, x0 */
|
||||
.long 0xd5033f9f /* dsb sy */
|
||||
.long 0xd539002a /* mrs x10, clidr_el1 */
|
||||
.long 0xd358fd4b /* lsr x11, x10, #24 */
|
||||
.long 0x9240096b /* and x11, x11, #0x7 */
|
||||
.long 0xb400024b /* cbz x11, <InvalidateFlushDcacheEnd> */
|
||||
.long 0xaa1e03ef /* mov x15, x30 */
|
||||
.long 0xd2800000 /* mov x0, #0x0 */
|
||||
|
||||
InvalidateFlushCachesLoopLevel:
|
||||
.long 0xd37ff80c /* lsl x12, x0, #1 */
|
||||
.long 0x8b00018c /* add x12, x12, x0 */
|
||||
.long 0x9acc254c /* lsr x12, x10, x12 */
|
||||
.long 0x9240098c /* and x12, x12, #0x7 */
|
||||
.long 0xf100099f /* cmp x12, #0x2 */
|
||||
.long 0x5400004b /* b.lt <InvalidateFlushCachesSkipLevel> */
|
||||
.long 0x97ffffd9 /* bl <InvalidateFlushDcacheLevel> */
|
||||
|
||||
InvalidateFlushCachesSkipLevel:
|
||||
.long 0x91000400 /* add x0, x0, #0x1 */
|
||||
.long 0xeb00017f /* cmp x11, x0 */
|
||||
.long 0x54fffeec /* b.gt <InvalidateFlushCachesLoopLevel> */
|
||||
.long 0xd2800000 /* mov x0, #0x0 */
|
||||
.long 0xd51a0000 /* msr csselr_el1, x0 */
|
||||
.long 0xd5033f9f /* dsb sy */
|
||||
.long 0xd5033fdf /* isb */
|
||||
.long 0xaa0f03fe /* mov x30, x15 */
|
||||
|
||||
InvalidateFlushDcacheEnd:
|
||||
/***************************************************************/
|
||||
|
||||
/* switch from aarch64-el2 to aarch32-el1 */
|
||||
Startup_Aarch32:
|
||||
.long 0xd5384240 /* mrs x0, currentel */
|
||||
.long 0xd342fc00 /* lsr x0, x0, #2 */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,9 @@
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUGING_COLOR
|
||||
#define RT_DEBUGING_CONTEXT
|
||||
#define RT_DEBUGING_INIT
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -38,15 +41,16 @@
|
||||
#define RT_USING_EVENT
|
||||
#define RT_USING_MAILBOX
|
||||
#define RT_USING_MESSAGEQUEUE
|
||||
#define RT_USING_MESSAGEQUEUE_PRIORITY
|
||||
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -56,6 +60,9 @@
|
||||
#define RT_CONSOLEBUF_SIZE 256
|
||||
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||
#define RT_VER_NUM 0x50001
|
||||
|
||||
/* RT-Thread Architecture */
|
||||
|
||||
#define RT_USING_CACHE
|
||||
#define RT_USING_HW_ATOMIC
|
||||
#define RT_USING_CPU_FFS
|
||||
@@ -95,8 +102,24 @@
|
||||
#define RT_USING_DFS_V1
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
|
||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||
|
||||
#define RT_DFS_ELM_CODE_PAGE 437
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_USE_LFN_3
|
||||
#define RT_DFS_ELM_USE_LFN 3
|
||||
#define RT_DFS_ELM_LFN_UNICODE_0
|
||||
#define RT_DFS_ELM_LFN_UNICODE 0
|
||||
#define RT_DFS_ELM_MAX_LFN 255
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
||||
#define RT_USING_DFS_DEVFS
|
||||
#define RT_USING_DFS_RAMFS
|
||||
#define RT_USING_DFS_MQUEUE
|
||||
#define RT_USING_LWP
|
||||
#define RT_LWP_MAX_NR 30
|
||||
#define LWP_TASK_STACK_SIZE 16384
|
||||
@@ -122,6 +145,13 @@
|
||||
#define RT_USING_ZERO
|
||||
#define RT_USING_RANDOM
|
||||
#define RT_USING_RTC
|
||||
#define RT_USING_SDIO
|
||||
#define RT_SDIO_STACK_SIZE 4096
|
||||
#define RT_SDIO_THREAD_PRIORITY 15
|
||||
#define RT_MMCSD_STACK_SIZE 4096
|
||||
#define RT_MMCSD_THREAD_PREORITY 22
|
||||
#define RT_MMCSD_MAX_PARTITION 16
|
||||
#define RT_USING_DEV_BUS
|
||||
|
||||
/* Using USB */
|
||||
|
||||
@@ -155,6 +185,59 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -163,7 +246,13 @@
|
||||
#define RT_USING_UTEST
|
||||
#define UTEST_THR_STACK_SIZE 4096
|
||||
#define UTEST_THR_PRIORITY 20
|
||||
#define RT_USING_RESOURCE_ID
|
||||
#define RT_USING_ADT
|
||||
#define RT_USING_ADT_AVL
|
||||
#define RT_USING_ADT_BITMAP
|
||||
#define RT_USING_ADT_HASHMAP
|
||||
#define RT_USING_ADT_REF
|
||||
#define RT_USING_KTIME
|
||||
|
||||
/* RT-Thread Utestcases */
|
||||
|
||||
@@ -287,6 +376,11 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
#define BSP_USING_SDIO
|
||||
#define BSP_USING_SDCARD_FATFS
|
||||
#define USING_SDIO1
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -307,11 +401,22 @@
|
||||
|
||||
#define USE_GIC
|
||||
#define ENABLE_GICV3
|
||||
#define USE_IOPAD
|
||||
#define ENABLE_IOPAD
|
||||
#define USE_SERIAL
|
||||
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
|
||||
/* Sdk common configuration */
|
||||
|
||||
#define LOG_ERROR
|
||||
#define USE_DEFAULT_INTERRUPT_CONFIG
|
||||
#define INTERRUPT_ROLE_MASTER
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,9 @@
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUGING_COLOR
|
||||
#define RT_DEBUGING_CONTEXT
|
||||
#define RT_DEBUGING_INIT
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -37,15 +40,16 @@
|
||||
#define RT_USING_EVENT
|
||||
#define RT_USING_MAILBOX
|
||||
#define RT_USING_MESSAGEQUEUE
|
||||
#define RT_USING_MESSAGEQUEUE_PRIORITY
|
||||
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -55,6 +59,9 @@
|
||||
#define RT_CONSOLEBUF_SIZE 256
|
||||
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||
#define RT_VER_NUM 0x50001
|
||||
|
||||
/* RT-Thread Architecture */
|
||||
|
||||
#define RT_USING_CACHE
|
||||
#define RT_USING_HW_ATOMIC
|
||||
#define RT_USING_CPU_FFS
|
||||
@@ -93,8 +100,24 @@
|
||||
#define RT_USING_DFS_V1
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
|
||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||
|
||||
#define RT_DFS_ELM_CODE_PAGE 437
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_USE_LFN_3
|
||||
#define RT_DFS_ELM_USE_LFN 3
|
||||
#define RT_DFS_ELM_LFN_UNICODE_0
|
||||
#define RT_DFS_ELM_LFN_UNICODE 0
|
||||
#define RT_DFS_ELM_MAX_LFN 255
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
||||
#define RT_USING_DFS_DEVFS
|
||||
#define RT_USING_DFS_RAMFS
|
||||
#define RT_USING_DFS_MQUEUE
|
||||
|
||||
/* Device Drivers */
|
||||
|
||||
@@ -111,6 +134,13 @@
|
||||
#define RT_USING_ZERO
|
||||
#define RT_USING_RANDOM
|
||||
#define RT_USING_RTC
|
||||
#define RT_USING_SDIO
|
||||
#define RT_SDIO_STACK_SIZE 4096
|
||||
#define RT_SDIO_THREAD_PRIORITY 15
|
||||
#define RT_MMCSD_STACK_SIZE 4096
|
||||
#define RT_MMCSD_THREAD_PREORITY 22
|
||||
#define RT_MMCSD_MAX_PARTITION 16
|
||||
#define RT_USING_DEV_BUS
|
||||
|
||||
/* Using USB */
|
||||
|
||||
@@ -144,6 +174,59 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -152,7 +235,13 @@
|
||||
#define RT_USING_UTEST
|
||||
#define UTEST_THR_STACK_SIZE 4096
|
||||
#define UTEST_THR_PRIORITY 20
|
||||
#define RT_USING_RESOURCE_ID
|
||||
#define RT_USING_ADT
|
||||
#define RT_USING_ADT_AVL
|
||||
#define RT_USING_ADT_BITMAP
|
||||
#define RT_USING_ADT_HASHMAP
|
||||
#define RT_USING_ADT_REF
|
||||
#define RT_USING_KTIME
|
||||
|
||||
/* RT-Thread Utestcases */
|
||||
|
||||
@@ -276,6 +365,11 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
#define BSP_USING_SDIO
|
||||
#define BSP_USING_SDCARD_FATFS
|
||||
#define USING_SDIO1
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -296,11 +390,22 @@
|
||||
|
||||
#define USE_GIC
|
||||
#define ENABLE_GICV3
|
||||
#define USE_IOPAD
|
||||
#define ENABLE_IOPAD
|
||||
#define USE_SERIAL
|
||||
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
|
||||
/* Sdk common configuration */
|
||||
|
||||
#define LOG_ERROR
|
||||
#define USE_DEFAULT_INTERRUPT_CONFIG
|
||||
#define INTERRUPT_ROLE_MASTER
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@
|
||||
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUG
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -155,6 +155,59 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -250,7 +303,7 @@
|
||||
/* Arduino libraries */
|
||||
|
||||
|
||||
/* Projects */
|
||||
/* Projects and Demos */
|
||||
|
||||
|
||||
/* Sensors */
|
||||
@@ -287,6 +340,8 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -312,6 +367,12 @@
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
#define LOG_ERROR
|
||||
#define USE_DEFAULT_INTERRUPT_CONFIG
|
||||
#define INTERRUPT_ROLE_MASTER
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@
|
||||
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUG
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -144,6 +144,59 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -239,7 +292,7 @@
|
||||
/* Arduino libraries */
|
||||
|
||||
|
||||
/* Projects */
|
||||
/* Projects and Demos */
|
||||
|
||||
|
||||
/* Sensors */
|
||||
@@ -276,6 +329,8 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -301,6 +356,12 @@
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
#define LOG_ERROR
|
||||
#define USE_DEFAULT_INTERRUPT_CONFIG
|
||||
#define INTERRUPT_ROLE_MASTER
|
||||
|
||||
@@ -27,6 +27,10 @@ else
|
||||
RTCONFIG := $(RTCONFIG)_rtthread
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PHYTIUM_RTT_TEST
|
||||
RTCONFIG := $(RTCONFIG)_test
|
||||
endif
|
||||
|
||||
boot:
|
||||
make all
|
||||
cp rtthread_a32.elf /mnt/d/tftboot
|
||||
@@ -59,20 +63,44 @@ load_e2000q_rtsmart:
|
||||
@cp ./configs/e2000q_rtsmart.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000q_rtsmart_test:
|
||||
@echo "Load configs from ./configs/e2000q_rtsmart_test"
|
||||
@cp ./configs/e2000q_rtsmart_test ./.config -f
|
||||
@cp ./configs/e2000q_rtsmart_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000q_rtthread:
|
||||
@echo "Load configs from ./configs/e2000q_rtthread"
|
||||
@cp ./configs/e2000q_rtthread ./.config -f
|
||||
@cp ./configs/e2000q_rtthread.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000q_rtthread_test:
|
||||
@echo "Load configs from ./configs/e2000q_rtthread_test"
|
||||
@cp ./configs/e2000q_rtthread_test ./.config -f
|
||||
@cp ./configs/e2000q_rtthread_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtsmart:
|
||||
@echo "Load configs from ./configs/e2000d_rtsmart"
|
||||
@cp ./configs/e2000d_rtsmart ./.config -f
|
||||
@cp ./configs/e2000d_rtsmart.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtsmart_test:
|
||||
@echo "Load configs from ./configs/e2000d_rtsmart_test"
|
||||
@cp ./configs/e2000d_rtsmart_test ./.config -f
|
||||
@cp ./configs/e2000d_rtsmart_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtthread:
|
||||
@echo "Load configs from ./configs/e2000d_rtthread"
|
||||
@cp ./configs/e2000d_rtthread ./.config -f
|
||||
@cp ./configs/e2000d_rtthread.h ./rtconfig.h -f
|
||||
scons -c
|
||||
|
||||
load_e2000d_rtthread_test:
|
||||
@echo "Load configs from ./configs/e2000d_rtthread_test"
|
||||
@cp ./configs/e2000d_rtthread_test ./.config -f
|
||||
@cp ./configs/e2000d_rtthread_test.h ./rtconfig.h -f
|
||||
scons -c
|
||||
@@ -29,7 +29,10 @@
|
||||
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_DEBUG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUGING_COLOR
|
||||
#define RT_DEBUGING_CONTEXT
|
||||
#define RT_DEBUGING_INIT
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -38,15 +41,16 @@
|
||||
#define RT_USING_EVENT
|
||||
#define RT_USING_MAILBOX
|
||||
#define RT_USING_MESSAGEQUEUE
|
||||
#define RT_USING_MESSAGEQUEUE_PRIORITY
|
||||
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -56,6 +60,9 @@
|
||||
#define RT_CONSOLEBUF_SIZE 256
|
||||
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||
#define RT_VER_NUM 0x50001
|
||||
|
||||
/* RT-Thread Architecture */
|
||||
|
||||
#define RT_USING_CACHE
|
||||
#define RT_USING_HW_ATOMIC
|
||||
#define RT_USING_CPU_FFS
|
||||
@@ -95,8 +102,24 @@
|
||||
#define RT_USING_DFS_V1
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
|
||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||
|
||||
#define RT_DFS_ELM_CODE_PAGE 437
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_USE_LFN_3
|
||||
#define RT_DFS_ELM_USE_LFN 3
|
||||
#define RT_DFS_ELM_LFN_UNICODE_0
|
||||
#define RT_DFS_ELM_LFN_UNICODE 0
|
||||
#define RT_DFS_ELM_MAX_LFN 255
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
||||
#define RT_USING_DFS_DEVFS
|
||||
#define RT_USING_DFS_RAMFS
|
||||
#define RT_USING_DFS_MQUEUE
|
||||
#define RT_USING_LWP
|
||||
#define RT_LWP_MAX_NR 30
|
||||
#define LWP_TASK_STACK_SIZE 16384
|
||||
@@ -122,6 +145,13 @@
|
||||
#define RT_USING_ZERO
|
||||
#define RT_USING_RANDOM
|
||||
#define RT_USING_RTC
|
||||
#define RT_USING_SDIO
|
||||
#define RT_SDIO_STACK_SIZE 4096
|
||||
#define RT_SDIO_THREAD_PRIORITY 15
|
||||
#define RT_MMCSD_STACK_SIZE 4096
|
||||
#define RT_MMCSD_THREAD_PREORITY 22
|
||||
#define RT_MMCSD_MAX_PARTITION 16
|
||||
#define RT_USING_DEV_BUS
|
||||
|
||||
/* Using USB */
|
||||
|
||||
@@ -155,6 +185,59 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -163,8 +246,13 @@
|
||||
#define RT_USING_UTEST
|
||||
#define UTEST_THR_STACK_SIZE 4096
|
||||
#define UTEST_THR_PRIORITY 20
|
||||
#define RT_USING_RESOURCE_ID
|
||||
#define RT_USING_ADT
|
||||
#define RT_USING_ADT_AVL
|
||||
#define RT_USING_ADT_BITMAP
|
||||
#define RT_USING_ADT_HASHMAP
|
||||
#define RT_USING_ADT_REF
|
||||
#define RT_USING_KTIME
|
||||
|
||||
/* RT-Thread Utestcases */
|
||||
|
||||
@@ -251,7 +339,7 @@
|
||||
/* Arduino libraries */
|
||||
|
||||
|
||||
/* Projects */
|
||||
/* Projects and Demos */
|
||||
|
||||
|
||||
/* Sensors */
|
||||
@@ -288,6 +376,11 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
#define BSP_USING_SDIO
|
||||
#define BSP_USING_SDCARD_FATFS
|
||||
#define USING_SDIO1
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -308,11 +401,22 @@
|
||||
|
||||
#define USE_GIC
|
||||
#define ENABLE_GICV3
|
||||
#define USE_IOPAD
|
||||
#define ENABLE_IOPAD
|
||||
#define USE_SERIAL
|
||||
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
|
||||
/* Sdk common configuration */
|
||||
|
||||
#define LOG_ERROR
|
||||
#define USE_DEFAULT_INTERRUPT_CONFIG
|
||||
#define INTERRUPT_ROLE_MASTER
|
||||
|
||||
@@ -16,6 +16,7 @@ if PLATFORM == 'gcc':
|
||||
PREFIX = os.getenv('RTT_CC_PREFIX') or 'arm-none-eabi-'
|
||||
CC = PREFIX + 'gcc'
|
||||
CXX = PREFIX + 'g++'
|
||||
CPP = PREFIX + 'cpp'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
@@ -28,6 +29,7 @@ if PLATFORM == 'gcc':
|
||||
AFPFLAGS = ' -mfloat-abi=softfp -mfpu=neon'
|
||||
DEVICE = ' -march=armv8-a -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
|
||||
|
||||
CPPFLAGS= ' -E -P -x assembler-with-cpp'
|
||||
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always'
|
||||
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -D_POSIX_SOURCE -fdiagnostics-color=always'
|
||||
AFLAGS = DEVICE + ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
|
||||
|
||||
+191
-31
File diff suppressed because it is too large
Load Diff
@@ -65,5 +65,3 @@ menu "Standalone Setting"
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -114,6 +114,12 @@ rtthread_a64.map
|
||||
|
||||
- 可以用串口通过 XMODEM 协议将 bin/elf 文件上传到开发板,然后启动,
|
||||
|
||||
- 如果使用 SD-1 控制器
|
||||
|
||||
```
|
||||
mw.l 0x32b31178 0x1f
|
||||
```
|
||||
|
||||
- 首先在 Phytium 开发板上输入,上传 bin 文件
|
||||
|
||||
```
|
||||
|
||||
@@ -53,10 +53,6 @@ if not IS_EXPORTED: # if project is not exported, libraries and board need to ma
|
||||
# include board
|
||||
objs.extend(SConscript(os.path.join(BSP_ROOT + '/board', 'SConscript')))
|
||||
|
||||
if GetDepend('RT_USING_SMART'):
|
||||
# use smart link.lds
|
||||
env['LINKFLAGS'] = env['LINKFLAGS'].replace('link.lds', 'link_smart.lds')
|
||||
|
||||
# make a building
|
||||
DoBuilding(TARGET, objs)
|
||||
|
||||
|
||||
@@ -8,56 +8,88 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023-04-27 huanghe first version
|
||||
* 2023-07-14 liqiaozhong add SD file sys mount func
|
||||
*
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#ifdef RT_USING_DFS_RAMFS
|
||||
#include <dfs_fs.h>
|
||||
#if defined(RT_USING_DFS)
|
||||
#include <rtdbg.h>
|
||||
|
||||
extern struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size);
|
||||
|
||||
int mnt_init(void)
|
||||
{
|
||||
rt_uint8_t *pool = RT_NULL;
|
||||
rt_size_t size = 8*1024*1024;
|
||||
|
||||
pool = rt_malloc(size);
|
||||
if (pool == RT_NULL)
|
||||
return 0;
|
||||
|
||||
if (dfs_mount(RT_NULL, "/", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0)
|
||||
rt_kprintf("RAM file system initializated!\n");
|
||||
else
|
||||
rt_kprintf("RAM file system initializate failed!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
INIT_ENV_EXPORT(mnt_init);
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_SDCARD_FATFS
|
||||
#include <dfs_fs.h>
|
||||
#include <dfs_file.h>
|
||||
|
||||
#define DBG_TAG "app.filesystem"
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifdef BSP_USING_SDCARD_FATFS
|
||||
#define SD_DEIVCE_NAME "sd"
|
||||
static int filesystem_mount(void)
|
||||
{
|
||||
while(rt_device_find("sd0") == RT_NULL)
|
||||
while (rt_device_find(SD_DEIVCE_NAME) == RT_NULL)
|
||||
{
|
||||
rt_thread_mdelay(1);
|
||||
}
|
||||
|
||||
int ret = dfs_mount("sd0", "/", "elm", 0, 0);
|
||||
if (ret != 0)
|
||||
if (dfs_mount(SD_DEIVCE_NAME, "/", "elm", 0, 0) == 0)
|
||||
{
|
||||
rt_kprintf("ret: %d\n",ret);
|
||||
LOG_E("sd0 mount to '/' failed!");
|
||||
return ret;
|
||||
LOG_I("file system initialization done!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_W("[sd] File System on SD initialization failed!");
|
||||
LOG_W("[sd] Try to format and re-mount...");
|
||||
if (dfs_mkfs("elm", SD_DEIVCE_NAME) == 0)
|
||||
{
|
||||
if (dfs_mount(SD_DEIVCE_NAME, "/", "elm", 0, 0) == 0)
|
||||
{
|
||||
LOG_I("[sd] File System on SD initialized!");
|
||||
}
|
||||
}
|
||||
LOG_E("[sd] File System on SD initialization failed!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mkdir("/ram", 0x777);
|
||||
|
||||
#ifdef RT_USING_DFS_RAMFS
|
||||
extern struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size);
|
||||
|
||||
rt_uint8_t *pool = RT_NULL;
|
||||
rt_size_t size = 8 * 1024 * 1024;
|
||||
|
||||
pool = rt_malloc(size);
|
||||
if (pool == RT_NULL)
|
||||
LOG_E("Malloc fail!");
|
||||
|
||||
if (dfs_mount(RT_NULL, "/ram", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0)
|
||||
LOG_I("RAM file system initializated!");
|
||||
else
|
||||
LOG_E("RAM file system initializate failed!");
|
||||
#endif
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_ENV_EXPORT(filesystem_mount);
|
||||
#else
|
||||
static int filesystem_mount(void)
|
||||
{
|
||||
#ifdef RT_USING_DFS_RAMFS
|
||||
extern struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size);
|
||||
|
||||
rt_uint8_t *pool = RT_NULL;
|
||||
rt_size_t size = 8 * 1024 * 1024;
|
||||
|
||||
pool = rt_malloc(size);
|
||||
if (pool == RT_NULL)
|
||||
LOG_E("Malloc fail!");
|
||||
|
||||
if (dfs_mount(RT_NULL, "/", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0)
|
||||
LOG_I("RAM file system initializated!");
|
||||
else
|
||||
LOG_E("RAM file system initializate failed!");
|
||||
#endif
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_ENV_EXPORT(filesystem_mount);
|
||||
#endif
|
||||
#endif // #ifdef BSP_USING_SDCARD_FATFS
|
||||
#endif // #if defined(RT_USING_DFS)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -18,17 +18,20 @@
|
||||
#define RT_HOOK_USING_FUNC_PTR
|
||||
#define RT_USING_IDLE_HOOK
|
||||
#define RT_IDLE_HOOK_LIST_SIZE 4
|
||||
#define IDLE_THREAD_STACK_SIZE 40960
|
||||
#define SYSTEM_THREAD_STACK_SIZE 40960
|
||||
#define IDLE_THREAD_STACK_SIZE 8192
|
||||
#define SYSTEM_THREAD_STACK_SIZE 8192
|
||||
#define RT_USING_TIMER_SOFT
|
||||
#define RT_TIMER_THREAD_PRIO 4
|
||||
#define RT_TIMER_THREAD_STACK_SIZE 4096
|
||||
#define RT_TIMER_THREAD_STACK_SIZE 8192
|
||||
|
||||
/* kservice optimization */
|
||||
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUGING_COLOR
|
||||
#define RT_DEBUGING_CONTEXT
|
||||
#define RT_DEBUGING_INIT
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -40,12 +43,12 @@
|
||||
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_PAGE_MAX_ORDER 16
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -55,14 +58,20 @@
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||
#define RT_VER_NUM 0x50001
|
||||
|
||||
/* RT-Thread Architecture */
|
||||
|
||||
#define ARCH_CPU_64BIT
|
||||
#define RT_USING_CACHE
|
||||
#define RT_USING_HW_ATOMIC
|
||||
#define ARCH_ARM_BOOTWITH_FLUSH_CACHE
|
||||
#define ARCH_MM_MMU
|
||||
#define ARCH_ARM
|
||||
#define ARCH_ARM_MMU
|
||||
#define ARCH_ARMV8
|
||||
#define ARCH_TEXT_OFFSET 0x80000
|
||||
#define ARCH_RAM_OFFSET 0x80000000
|
||||
#define ARCH_SECONDARY_CPU_STACK_SIZE 4096
|
||||
#define ARCH_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
|
||||
/* RT-Thread Components */
|
||||
|
||||
@@ -93,6 +102,21 @@
|
||||
#define RT_USING_DFS_V1
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
|
||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||
|
||||
#define RT_DFS_ELM_CODE_PAGE 437
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_USE_LFN_3
|
||||
#define RT_DFS_ELM_USE_LFN 3
|
||||
#define RT_DFS_ELM_LFN_UNICODE_0
|
||||
#define RT_DFS_ELM_LFN_UNICODE 0
|
||||
#define RT_DFS_ELM_MAX_LFN 255
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
||||
#define RT_USING_DFS_DEVFS
|
||||
#define RT_USING_DFS_RAMFS
|
||||
|
||||
@@ -111,6 +135,12 @@
|
||||
#define RT_USING_ZERO
|
||||
#define RT_USING_RANDOM
|
||||
#define RT_USING_RTC
|
||||
#define RT_USING_SDIO
|
||||
#define RT_SDIO_STACK_SIZE 4096
|
||||
#define RT_SDIO_THREAD_PRIORITY 15
|
||||
#define RT_MMCSD_STACK_SIZE 4096
|
||||
#define RT_MMCSD_THREAD_PREORITY 22
|
||||
#define RT_MMCSD_MAX_PARTITION 16
|
||||
|
||||
/* Using USB */
|
||||
|
||||
@@ -137,12 +167,73 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
#define RT_LWIP_DEBUG
|
||||
#define RT_LWIP_NETIF_DEBUG
|
||||
|
||||
/* Utilities */
|
||||
|
||||
#define RT_USING_RYM
|
||||
#define YMODEM_USING_FILE_TRANSFER
|
||||
#define RT_USING_RESOURCE_ID
|
||||
#define RT_USING_ADT
|
||||
#define RT_USING_ADT_AVL
|
||||
#define RT_USING_ADT_BITMAP
|
||||
#define RT_USING_ADT_HASHMAP
|
||||
#define RT_USING_ADT_REF
|
||||
#define RT_USING_KTIME
|
||||
|
||||
/* RT-Thread Utestcases */
|
||||
|
||||
@@ -269,6 +360,11 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
#define BSP_USING_SDIO
|
||||
#define BSP_USING_SDCARD_FATFS
|
||||
#define USING_SDIO1
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -296,11 +392,22 @@
|
||||
/* Qspi Configuration */
|
||||
|
||||
#define USE_FQSPI
|
||||
#define USE_IOPAD
|
||||
#define ENABLE_IOPAD
|
||||
#define USE_SERIAL
|
||||
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
|
||||
/* Sdk common configuration */
|
||||
|
||||
#define LOG_ERROR
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@
|
||||
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUG
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_PAGE_MAX_ORDER 16
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -58,7 +58,6 @@
|
||||
#define RT_VER_NUM 0x50001
|
||||
#define ARCH_CPU_64BIT
|
||||
#define RT_USING_CACHE
|
||||
#define RT_USING_HW_ATOMIC
|
||||
#define ARCH_ARM_BOOTWITH_FLUSH_CACHE
|
||||
#define ARCH_MM_MMU
|
||||
#define ARCH_ARM
|
||||
@@ -95,6 +94,21 @@
|
||||
#define RT_USING_DFS_V1
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
|
||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||
|
||||
#define RT_DFS_ELM_CODE_PAGE 437
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_USE_LFN_3
|
||||
#define RT_DFS_ELM_USE_LFN 3
|
||||
#define RT_DFS_ELM_LFN_UNICODE_0
|
||||
#define RT_DFS_ELM_LFN_UNICODE 0
|
||||
#define RT_DFS_ELM_MAX_LFN 255
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
||||
#define RT_USING_DFS_DEVFS
|
||||
#define RT_USING_DFS_RAMFS
|
||||
#define RT_USING_LWP
|
||||
@@ -121,6 +135,12 @@
|
||||
#define RT_USING_ZERO
|
||||
#define RT_USING_RANDOM
|
||||
#define RT_USING_RTC
|
||||
#define RT_USING_SDIO
|
||||
#define RT_SDIO_STACK_SIZE 512
|
||||
#define RT_SDIO_THREAD_PRIORITY 15
|
||||
#define RT_MMCSD_STACK_SIZE 1024
|
||||
#define RT_MMCSD_THREAD_PREORITY 22
|
||||
#define RT_MMCSD_MAX_PARTITION 16
|
||||
|
||||
/* Using USB */
|
||||
|
||||
@@ -147,6 +167,61 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
#define RT_LWIP_DEBUG
|
||||
#define RT_LWIP_NETIF_DEBUG
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -279,6 +354,11 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
#define BSP_USING_SDIO
|
||||
#define BSP_USING_SDCARD_FATFS
|
||||
#define USING_SDIO1
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -306,11 +386,19 @@
|
||||
/* Qspi Configuration */
|
||||
|
||||
#define USE_FQSPI
|
||||
#define USE_IOPAD
|
||||
#define ENABLE_IOPAD
|
||||
#define USE_SERIAL
|
||||
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
#define LOG_ERROR
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
||||
|
||||
#define RT_NAME_MAX 16
|
||||
#define RT_USING_SMP
|
||||
#define RT_CPUS_NR 4
|
||||
#define RT_CPUS_NR 2
|
||||
#define RT_ALIGN_SIZE 4
|
||||
#define RT_THREAD_PRIORITY_32
|
||||
#define RT_THREAD_PRIORITY_MAX 32
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#define RT_KSERVICE_USING_STDLIB
|
||||
#define RT_KPRINTF_USING_LONGLONG
|
||||
#define RT_USING_DEBUG
|
||||
#define RT_DEBUG
|
||||
|
||||
/* Inter-Thread communication */
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
|
||||
/* Memory Management */
|
||||
|
||||
#define RT_PAGE_MAX_ORDER 11
|
||||
#define RT_USING_MEMPOOL
|
||||
#define RT_USING_SMALL_MEM
|
||||
#define RT_PAGE_MAX_ORDER 16
|
||||
#define RT_USING_SLAB
|
||||
#define RT_USING_MEMHEAP
|
||||
#define RT_MEMHEAP_FAST_MODE
|
||||
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||
#define RT_USING_SLAB_AS_HEAP
|
||||
#define RT_USING_HEAP_ISR
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Kernel Device Object */
|
||||
@@ -57,7 +57,6 @@
|
||||
#define RT_VER_NUM 0x50001
|
||||
#define ARCH_CPU_64BIT
|
||||
#define RT_USING_CACHE
|
||||
#define RT_USING_HW_ATOMIC
|
||||
#define ARCH_ARM_BOOTWITH_FLUSH_CACHE
|
||||
#define ARCH_MM_MMU
|
||||
#define ARCH_ARM
|
||||
@@ -93,6 +92,21 @@
|
||||
#define RT_USING_DFS_V1
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
#define DFS_FILESYSTEM_TYPES_MAX 4
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
|
||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
||||
|
||||
#define RT_DFS_ELM_CODE_PAGE 437
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_USE_LFN_3
|
||||
#define RT_DFS_ELM_USE_LFN 3
|
||||
#define RT_DFS_ELM_LFN_UNICODE_0
|
||||
#define RT_DFS_ELM_LFN_UNICODE 0
|
||||
#define RT_DFS_ELM_MAX_LFN 255
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||
#define RT_DFS_ELM_REENTRANT
|
||||
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
|
||||
#define RT_USING_DFS_DEVFS
|
||||
#define RT_USING_DFS_RAMFS
|
||||
|
||||
@@ -137,6 +151,61 @@
|
||||
|
||||
/* Network */
|
||||
|
||||
#define RT_USING_SAL
|
||||
#define SAL_INTERNET_CHECK
|
||||
|
||||
/* Docking with protocol stacks */
|
||||
|
||||
#define SAL_USING_LWIP
|
||||
#define SAL_USING_POSIX
|
||||
#define RT_USING_NETDEV
|
||||
#define NETDEV_USING_IFCONFIG
|
||||
#define NETDEV_USING_PING
|
||||
#define NETDEV_USING_NETSTAT
|
||||
#define NETDEV_USING_AUTO_DEFAULT
|
||||
#define NETDEV_IPV4 1
|
||||
#define NETDEV_IPV6 0
|
||||
#define RT_USING_LWIP
|
||||
#define RT_USING_LWIP212
|
||||
#define RT_USING_LWIP_VER_NUM 0x20102
|
||||
#define RT_LWIP_MEM_ALIGNMENT 64
|
||||
#define RT_LWIP_IGMP
|
||||
#define RT_LWIP_ICMP
|
||||
#define RT_LWIP_DNS
|
||||
|
||||
/* Static IPv4 Address */
|
||||
|
||||
#define RT_LWIP_IPADDR "192.168.4.10"
|
||||
#define RT_LWIP_GWADDR "192.168.4.1"
|
||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||
#define RT_LWIP_UDP
|
||||
#define RT_LWIP_TCP
|
||||
#define RT_LWIP_RAW
|
||||
#define RT_MEMP_NUM_NETCONN 8
|
||||
#define RT_LWIP_PBUF_NUM 512
|
||||
#define RT_LWIP_RAW_PCB_NUM 4
|
||||
#define RT_LWIP_UDP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_PCB_NUM 4
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
#define RT_LWIP_TCP_SND_BUF 8196
|
||||
#define RT_LWIP_TCP_WND 8196
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 16184
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 2048
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||
#define LWIP_NETIF_LINK_CALLBACK 1
|
||||
#define SO_REUSE 1
|
||||
#define LWIP_SO_RCVTIMEO 1
|
||||
#define LWIP_SO_SNDTIMEO 1
|
||||
#define LWIP_SO_RCVBUF 1
|
||||
#define LWIP_SO_LINGER 0
|
||||
#define LWIP_NETIF_LOOPBACK 0
|
||||
#define RT_LWIP_USING_PING
|
||||
#define RT_LWIP_DEBUG
|
||||
#define RT_LWIP_NETIF_DEBUG
|
||||
|
||||
/* Utilities */
|
||||
|
||||
@@ -269,6 +338,8 @@
|
||||
|
||||
#define BSP_USING_UART
|
||||
#define RT_USING_UART1
|
||||
#define BSP_USING_ETH
|
||||
#define RT_LWIP_PBUF_POOL_BUFSIZE 1700
|
||||
|
||||
/* Board extended module Drivers */
|
||||
|
||||
@@ -296,11 +367,19 @@
|
||||
/* Qspi Configuration */
|
||||
|
||||
#define USE_FQSPI
|
||||
#define USE_IOPAD
|
||||
#define ENABLE_IOPAD
|
||||
#define USE_SERIAL
|
||||
|
||||
/* Usart Configuration */
|
||||
|
||||
#define ENABLE_Pl011_UART
|
||||
#define USE_ETH
|
||||
|
||||
/* Eth Configuration */
|
||||
|
||||
#define ENABLE_FXMAC
|
||||
#define FXMAC_PHY_COMMON
|
||||
#define LOG_ERROR
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,148 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* 2017-5-30 bernard first version
|
||||
*/
|
||||
|
||||
/* _EL1_STACK_SIZE = DEFINED(_EL1_STACK_SIZE) ? _EL1_STACK_SIZE : 0x20000; */
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x80080000 ;
|
||||
. = ALIGN(4096);
|
||||
.text :
|
||||
{
|
||||
KEEP(*(.text.entrypoint)) /* The entry point */
|
||||
*(.vectors)
|
||||
*(.text) /* remaining code */
|
||||
*(.text.*) /* remaining code */
|
||||
|
||||
*(.rodata) /* read-only data (constants) */
|
||||
*(.rodata*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.gnu.linkonce.t*)
|
||||
|
||||
*(COMMON)
|
||||
|
||||
/* section information for utest */
|
||||
. = ALIGN(8);
|
||||
__rt_utest_tc_tab_start = .;
|
||||
KEEP(*(UtestTcTab))
|
||||
__rt_utest_tc_tab_end = .;
|
||||
|
||||
/* section information for finsh shell */
|
||||
. = ALIGN(16);
|
||||
__fsymtab_start = .;
|
||||
KEEP(*(FSymTab))
|
||||
__fsymtab_end = .;
|
||||
. = ALIGN(16);
|
||||
__vsymtab_start = .;
|
||||
KEEP(*(VSymTab))
|
||||
__vsymtab_end = .;
|
||||
. = ALIGN(16);
|
||||
|
||||
/* section information for initial. */
|
||||
. = ALIGN(16);
|
||||
__rt_init_start = .;
|
||||
KEEP(*(SORT(.rti_fn*)))
|
||||
__rt_init_end = .;
|
||||
. = ALIGN(16);
|
||||
|
||||
. = ALIGN(16);
|
||||
_etext = .;
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.eh_frame_hdr :
|
||||
{
|
||||
*(.eh_frame_hdr)
|
||||
*(.eh_frame_entry)
|
||||
}
|
||||
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||
|
||||
. = ALIGN(16);
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
|
||||
*(.data1)
|
||||
*(.data1.*)
|
||||
|
||||
. = ALIGN(16);
|
||||
_gp = ABSOLUTE(.); /* Base of small data */
|
||||
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
}
|
||||
|
||||
. = ALIGN(16);
|
||||
.ctors :
|
||||
{
|
||||
PROVIDE(__ctors_start__ = .);
|
||||
/* new GCC version uses .init_array */
|
||||
KEEP(*(SORT(.init_array.*)))
|
||||
KEEP(*(.init_array))
|
||||
PROVIDE(__ctors_end__ = .);
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.dtors :
|
||||
{
|
||||
PROVIDE(__dtors_start__ = .);
|
||||
KEEP(*(SORT(.dtors.*)))
|
||||
KEEP(*(.dtors))
|
||||
PROVIDE(__dtors_end__ = .);
|
||||
}
|
||||
|
||||
. = ALIGN(16);
|
||||
.bss :
|
||||
{
|
||||
PROVIDE(__bss_start = .);
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.dynbss)
|
||||
. = ALIGN(32);
|
||||
PROVIDE(__bss_end = .);
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
* Symbols in the DWARF debugging sections are relative to the beginning
|
||||
* of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
}
|
||||
|
||||
__bss_size = SIZEOF(.bss);
|
||||
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* 2017-5-30 bernard first version
|
||||
*/
|
||||
|
||||
/* _EL1_STACK_SIZE = DEFINED(_EL1_STACK_SIZE) ? _EL1_STACK_SIZE : 0x20000; */
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* . = 0x80080000 ; */
|
||||
. = 0xffff000000080000 ;
|
||||
. = ALIGN(4096);
|
||||
.text :
|
||||
{
|
||||
KEEP(*(.text.entrypoint)) /* The entry point */
|
||||
*(.vectors)
|
||||
*(.text) /* remaining code */
|
||||
*(.text.*) /* remaining code */
|
||||
|
||||
*(.rodata) /* read-only data (constants) */
|
||||
*(.rodata*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.gnu.linkonce.t*)
|
||||
|
||||
*(COMMON)
|
||||
|
||||
/* section information for utest */
|
||||
. = ALIGN(8);
|
||||
__rt_utest_tc_tab_start = .;
|
||||
KEEP(*(UtestTcTab))
|
||||
__rt_utest_tc_tab_end = .;
|
||||
|
||||
/* section information for finsh shell */
|
||||
. = ALIGN(16);
|
||||
__fsymtab_start = .;
|
||||
KEEP(*(FSymTab))
|
||||
__fsymtab_end = .;
|
||||
. = ALIGN(16);
|
||||
__vsymtab_start = .;
|
||||
KEEP(*(VSymTab))
|
||||
__vsymtab_end = .;
|
||||
. = ALIGN(16);
|
||||
|
||||
/* section information for initial. */
|
||||
. = ALIGN(16);
|
||||
__rt_init_start = .;
|
||||
KEEP(*(SORT(.rti_fn*)))
|
||||
__rt_init_end = .;
|
||||
. = ALIGN(16);
|
||||
|
||||
. = ALIGN(16);
|
||||
_etext = .;
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.eh_frame_hdr :
|
||||
{
|
||||
*(.eh_frame_hdr)
|
||||
*(.eh_frame_entry)
|
||||
}
|
||||
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||
|
||||
. = ALIGN(16);
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
|
||||
*(.data1)
|
||||
*(.data1.*)
|
||||
|
||||
. = ALIGN(16);
|
||||
_gp = ABSOLUTE(.); /* Base of small data */
|
||||
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
}
|
||||
|
||||
. = ALIGN(16);
|
||||
.ctors :
|
||||
{
|
||||
PROVIDE(__ctors_start__ = .);
|
||||
/* new GCC version uses .init_array */
|
||||
KEEP(*(SORT(.init_array.*)))
|
||||
KEEP(*(.init_array))
|
||||
PROVIDE(__ctors_end__ = .);
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.dtors :
|
||||
{
|
||||
PROVIDE(__dtors_start__ = .);
|
||||
KEEP(*(SORT(.dtors.*)))
|
||||
KEEP(*(.dtors))
|
||||
PROVIDE(__dtors_end__ = .);
|
||||
}
|
||||
|
||||
. = ALIGN(16);
|
||||
.bss :
|
||||
{
|
||||
PROVIDE(__bss_start = .);
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.dynbss)
|
||||
. = ALIGN(32);
|
||||
PROVIDE(__bss_end = .);
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
* Symbols in the DWARF debugging sections are relative to the beginning
|
||||
* of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
}
|
||||
|
||||
__bss_size = SIZEOF(.bss);
|
||||
@@ -28,6 +28,10 @@ else
|
||||
RTCONFIG := $(RTCONFIG)_rtthread
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PHYTIUM_RTT_TEST
|
||||
RTCONFIG := $(RTCONFIG)_test
|
||||
endif
|
||||
|
||||
boot:
|
||||
make all
|
||||
cp rtthread_a64.elf /mnt/d/tftboot
|
||||
@@ -60,20 +64,44 @@ load_e2000q_rtsmart:
|
||||
@cp ./configs/e2000q_rtsmart.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000q_rtsmart_test:
|
||||
@echo "Load configs from ./configs/e2000q_rtsmart"
|
||||
@cp ./configs/e2000q_rtsmart_test ./.config -f
|
||||
@cp ./configs/e2000q_rtsmart_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000q_rtthread:
|
||||
@echo "Load configs from ./configs/e2000q_rtthread"
|
||||
@cp ./configs/e2000q_rtthread ./.config -f
|
||||
@cp ./configs/e2000q_rtthread.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000q_rtthread_test:
|
||||
@echo "Load configs from ./configs/e2000q_rtthread"
|
||||
@cp ./configs/e2000q_rtthread_test ./.config -f
|
||||
@cp ./configs/e2000q_rtthread_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtsmart:
|
||||
@echo "Load configs from ./configs/e2000d_rtsmart"
|
||||
@cp ./configs/e2000d_rtsmart ./.config -f
|
||||
@cp ./configs/e2000d_rtsmart.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtsmart_test:
|
||||
@echo "Load configs from ./configs/e2000d_rtsmart"
|
||||
@cp ./configs/e2000d_rtsmart_test ./.config -f
|
||||
@cp ./configs/e2000d_rtsmart_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtthread:
|
||||
@echo "Load configs from ./configs/e2000d_rtthread"
|
||||
@cp ./configs/e2000d_rtthread ./.config -f
|
||||
@cp ./configs/e2000d_rtthread.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
|
||||
load_e2000d_rtthread_test:
|
||||
@echo "Load configs from ./configs/e2000d_rtthread"
|
||||
@cp ./configs/e2000d_rtthread_test ./.config -f
|
||||
@cp ./configs/e2000d_rtthread_test.h ./rtconfig.h -f
|
||||
@scons -c
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ if PLATFORM == 'gcc':
|
||||
PREFIX = os.getenv('RTT_CC_PREFIX') or 'aarch64-none-elf-'
|
||||
CC = PREFIX + 'gcc'
|
||||
CXX = PREFIX + 'g++'
|
||||
CPP = PREFIX + 'cpp'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
@@ -25,10 +26,11 @@ if PLATFORM == 'gcc':
|
||||
AFPFLAGS = ' '
|
||||
DEVICE = ' -march=armv8-a -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
|
||||
|
||||
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always'
|
||||
CPPFLAGS = ' -E -P -x assembler-with-cpp'
|
||||
CXXFLAGS = DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always'
|
||||
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always'
|
||||
AFLAGS = ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread_a64.map,-cref,-u,system_vectors -T link.lds' + ' -lsupc++ -lgcc -static'
|
||||
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread_a64.map,-cref,-u,system_vectors -T link.lds' + ' -lsupc++ -lgcc -static'
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
|
||||
+45
-22
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -10,6 +10,7 @@
|
||||
* 2022-10-26 huanghe first commit
|
||||
* 2022-10-26 zhugengyu support aarch64
|
||||
* 2023-04-13 zhugengyu support RT-Smart
|
||||
* 2023-07-27 zhugengyu update aarch32 gtimer usage
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -22,8 +23,8 @@
|
||||
#include <mm_page.h>
|
||||
|
||||
#ifdef RT_USING_SMART
|
||||
#include <page.h>
|
||||
#include <lwp_arch.h>
|
||||
#include <page.h>
|
||||
#include <lwp_arch.h>
|
||||
#endif
|
||||
|
||||
#include <gicv3.h>
|
||||
@@ -41,6 +42,11 @@
|
||||
#include "fprintk.h"
|
||||
#include "fearly_uart.h"
|
||||
#include "fcpu_info.h"
|
||||
#include "fiopad.h"
|
||||
|
||||
#ifdef RT_USING_SMP
|
||||
#include "fpsci.h"
|
||||
#endif
|
||||
|
||||
#define LOG_DEBUG_TAG "BOARD"
|
||||
#define BSP_LOG_ERROR(format, ...) FT_DEBUG_PRINT_E(LOG_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
@@ -48,6 +54,7 @@
|
||||
#define BSP_LOG_INFO(format, ...) FT_DEBUG_PRINT_I(LOG_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
#define BSP_LOG_DEBUG(format, ...) FT_DEBUG_PRINT_D(LOG_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
|
||||
FIOPadCtrl iopad_ctrl;
|
||||
/* mmu config */
|
||||
extern struct mem_desc platform_mem_desc[];
|
||||
extern const rt_uint32_t platform_mem_desc_size;
|
||||
@@ -62,7 +69,8 @@ void idle_wfi(void)
|
||||
*/
|
||||
extern size_t MMUTable[];
|
||||
|
||||
rt_region_t init_page_region = {
|
||||
rt_region_t init_page_region =
|
||||
{
|
||||
PAGE_START,
|
||||
PAGE_END
|
||||
};
|
||||
@@ -78,7 +86,7 @@ static rt_uint32_t timer_step;
|
||||
|
||||
void rt_hw_timer_isr(int vector, void *parameter)
|
||||
{
|
||||
GenericTimerCompare(timer_step);
|
||||
GenericTimerSetTimerCompareValue(GENERIC_TIMER_ID0, timer_step);
|
||||
rt_tick_increase();
|
||||
}
|
||||
|
||||
@@ -89,9 +97,9 @@ int rt_hw_timer_init(void)
|
||||
timer_step = GenericTimerFrequecy();
|
||||
timer_step /= RT_TICK_PER_SECOND;
|
||||
|
||||
GenericTimerCompare(timer_step);
|
||||
GenericTimerInterruptEnable();
|
||||
GenericTimerStart();
|
||||
GenericTimerSetTimerCompareValue(GENERIC_TIMER_ID0, timer_step);
|
||||
GenericTimerInterruptEnable(GENERIC_TIMER_ID0);
|
||||
GenericTimerStart(GENERIC_TIMER_ID0);
|
||||
return 0;
|
||||
}
|
||||
INIT_BOARD_EXPORT(rt_hw_timer_init);
|
||||
@@ -106,17 +114,17 @@ INIT_BOARD_EXPORT(rt_hw_timer_init);
|
||||
void rt_hw_board_aarch64_init(void)
|
||||
{
|
||||
/* AARCH64 */
|
||||
#if defined(RT_USING_SMART)
|
||||
/* 1. init rt_kernel_space table (aspace.start = KERNEL_VADDR_START , aspace.size = ), 2. init io map range (rt_ioremap_start \ rt_ioremap_size) 3. */
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void*)0xfffffffff0000000, 0x10000000, MMUTable, PV_OFFSET);
|
||||
#else
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void*)0x80000000, 0x10000000, MMUTable, 0);
|
||||
#endif
|
||||
#if defined(RT_USING_SMART)
|
||||
/* 1. init rt_kernel_space table (aspace.start = KERNEL_VADDR_START , aspace.size = ), 2. init io map range (rt_ioremap_start \ rt_ioremap_size) 3. */
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void *)0xfffffffff0000000, 0x10000000, MMUTable, PV_OFFSET);
|
||||
#else
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void *)0x80000000, 0x10000000, MMUTable, 0);
|
||||
#endif
|
||||
rt_page_init(init_page_region);
|
||||
|
||||
rt_hw_mmu_setup(&rt_kernel_space, platform_mem_desc, platform_mem_desc_size);
|
||||
|
||||
/* init memory pool */
|
||||
/* init memory pool */
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);
|
||||
#endif
|
||||
@@ -125,7 +133,13 @@ void rt_hw_board_aarch64_init(void)
|
||||
|
||||
rt_hw_gtimer_init();
|
||||
|
||||
FEarlyUartProbe();
|
||||
|
||||
FIOPadCfgInitialize(&iopad_ctrl, FIOPadLookupConfig(FIOPAD0_ID));
|
||||
|
||||
#ifdef RT_USING_SMART
|
||||
iopad_ctrl.config.base_address = (uintptr)rt_ioremap((void *)iopad_ctrl.config.base_address, 0x2000);
|
||||
#endif
|
||||
|
||||
/* compoent init */
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
@@ -141,12 +155,15 @@ void rt_hw_board_aarch64_init(void)
|
||||
rt_thread_idle_sethook(idle_wfi);
|
||||
|
||||
#ifdef RT_USING_SMP
|
||||
FPsciInit();
|
||||
/* install IPI handle */
|
||||
rt_hw_interrupt_set_priority(RT_SCHEDULE_IPI, 16);
|
||||
rt_hw_ipi_handler_install(RT_SCHEDULE_IPI, rt_scheduler_ipi_handler);
|
||||
rt_hw_interrupt_umask(RT_SCHEDULE_IPI);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -156,25 +173,25 @@ void rt_hw_board_aarch32_init(void)
|
||||
#if defined(RT_USING_SMART)
|
||||
|
||||
/* set io map range is 0xf0000000 ~ 0x10000000 , Memory Protection start address is 0xf0000000 - rt_mpr_size */
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void*)0xf0000000, 0x10000000, MMUTable, PV_OFFSET);
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void *)0xf0000000, 0x10000000, MMUTable, PV_OFFSET);
|
||||
|
||||
rt_page_init(init_page_region);
|
||||
|
||||
/* rt_kernel_space 在start_gcc.S 中被初始化,此函数将iomap 空间放置在kernel space 上 */
|
||||
rt_hw_mmu_ioremap_init(&rt_kernel_space, (void*)0xf0000000, 0x10000000);
|
||||
rt_hw_mmu_ioremap_init(&rt_kernel_space, (void *)0xf0000000, 0x10000000);
|
||||
/* */
|
||||
arch_kuser_init(&rt_kernel_space, (void*)0xffff0000);
|
||||
arch_kuser_init(&rt_kernel_space, (void *)0xffff0000);
|
||||
#else
|
||||
/*
|
||||
map kernel space memory (totally 1GB = 0x10000000), pv_offset = 0 if not RT_SMART:
|
||||
0x80000000 ~ 0x80100000: kernel stack
|
||||
0x80100000 ~ __bss_end: kernel code and data
|
||||
*/
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void*)0x80000000, 0x10000000, MMUTable, 0);
|
||||
rt_hw_mmu_ioremap_init(&rt_kernel_space, (void*)0x80000000, 0x10000000);
|
||||
rt_hw_mmu_map_init(&rt_kernel_space, (void *)0x80000000, 0x10000000, MMUTable, 0);
|
||||
rt_hw_mmu_ioremap_init(&rt_kernel_space, (void *)0x80000000, 0x10000000);
|
||||
#endif
|
||||
|
||||
/* init memory pool */
|
||||
/* init memory pool */
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);
|
||||
#endif
|
||||
@@ -189,8 +206,13 @@ void rt_hw_board_aarch32_init(void)
|
||||
#endif
|
||||
rt_uint32_t redist_addr = 0;
|
||||
|
||||
FEarlyUartProbe();
|
||||
|
||||
FIOPadCfgInitialize(&iopad_ctrl, FIOPadLookupConfig(FIOPAD0_ID));
|
||||
|
||||
#if defined(RT_USING_SMART)
|
||||
redist_addr = (uint32_t)rt_ioremap(GICV3_RD_BASE_ADDR, 4 * 128*1024);
|
||||
redist_addr = (uint32_t)rt_ioremap(GICV3_RD_BASE_ADDR, 4 * 128 * 1024);
|
||||
iopad_ctrl.config.base_address = (uintptr)rt_ioremap((void *)iopad_ctrl.config.base_address, 0x2000);
|
||||
#else
|
||||
redist_addr = GICV3_RD_BASE_ADDR;
|
||||
#endif
|
||||
@@ -242,6 +264,7 @@ void rt_hw_board_aarch32_init(void)
|
||||
rt_thread_idle_sethook(idle_wfi);
|
||||
|
||||
#ifdef RT_USING_SMP
|
||||
FPsciInit();
|
||||
/* install IPI handle */
|
||||
rt_hw_interrupt_set_priority(RT_SCHEDULE_IPI, 16);
|
||||
rt_hw_ipi_handler_install(RT_SCHEDULE_IPI, rt_scheduler_ipi_handler);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* Date Author Notes
|
||||
* 2022-10-26 huanghe first commit
|
||||
* 2022-04-13 zhugengyu support RT-Smart
|
||||
* 2023-07-27 liqiaozhong add gpio pin definition
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -17,6 +18,7 @@
|
||||
|
||||
#include "fparameters.h"
|
||||
#include "phytium_cpu.h"
|
||||
#include "fkernel.h"
|
||||
|
||||
#include "mmu.h"
|
||||
#ifdef RT_USING_SMART
|
||||
@@ -44,6 +46,16 @@
|
||||
#define PAGE_END (PAGE_START +PAGE_POOL_SIZE)
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_PIN
|
||||
/* gpio pin_index handle */
|
||||
#define FGPIO_OPS_PIN_INDEX(ctrl, port, pin) SET_REG32_BITS(ctrl, 19, 12) | \
|
||||
SET_REG32_BITS(port, 11, 8) | \
|
||||
SET_REG32_BITS(pin, 7, 0)
|
||||
#define FGPIO_OPS_PIN_CTRL_ID(pin_idx) GET_REG32_BITS(pin_idx, 19, 12)
|
||||
#define FGPIO_OPS_PIN_PORT_ID(pin_idx) GET_REG32_BITS(pin_idx, 11, 8)
|
||||
#define FGPIO_OPS_PIN_ID(pin_idx) GET_REG32_BITS(pin_idx, 7, 0)
|
||||
#endif
|
||||
|
||||
void rt_hw_board_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023-04-27 huanghe first version
|
||||
* 2023-07-27 zhangyan add qspi io space
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -48,6 +49,12 @@ struct mem_desc platform_mem_desc[] = {
|
||||
0x28000000U,
|
||||
DEVICE_MEM
|
||||
},
|
||||
{
|
||||
0x00001000U,
|
||||
0x0FFFFFFFU,
|
||||
0x00001000U,
|
||||
DEVICE_MEM
|
||||
},
|
||||
};
|
||||
#else
|
||||
struct mem_desc platform_mem_desc[] =
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Email: opensource_embedded@phytium.com.cn
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023-07-26 huanghe first commit
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fparameters.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* Date Author Notes
|
||||
* 2022-10-26 huanghe first commit
|
||||
* 2022-10-26 zhugengyu support aarch64
|
||||
* 2023-07-26 huanghe update psci uage
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -82,13 +83,14 @@ void rt_hw_secondary_cpu_up(void)
|
||||
|
||||
#if defined(TARGET_ARMV8_AARCH64)
|
||||
/* code */
|
||||
rt_kprintf("cpu_mask = 0x%x \n", cpu_mask);
|
||||
char *entry = (char *)_secondary_cpu_entry;
|
||||
entry += PV_OFFSET;
|
||||
PsciCpuOn(cpu_mask, (uintptr)entry);
|
||||
FPsciCpuMaskOn(cpu_mask, (uintptr)entry);
|
||||
__DSB();
|
||||
#else
|
||||
/* code */
|
||||
PsciCpuOn(cpu_mask, (uintptr)rt_secondary_cpu_entry);
|
||||
FPsciCpuMaskOn(cpu_mask, (uintptr)rt_secondary_cpu_entry);
|
||||
__asm__ volatile("dsb" ::: "memory");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,7 +19,10 @@ if GetDepend(['TARGET_ARMV8_AARCH32']):
|
||||
path += [STANDALONE_DIR + '/port/arch/armv8/aarch32']
|
||||
elif GetDepend(['TARGET_ARMV8_AARCH64']):
|
||||
src += Glob(STANDALONE_DIR+'/port/arch/armv8/aarch64/*.c') + Glob(STANDALONE_DIR+'/port/arch/armv8/aarch64/*.S')
|
||||
path += [STANDALONE_DIR + '/port/arch/armv8/aarch64']
|
||||
path += [STANDALONE_DIR + '/port/arch/armv8/aarch64']
|
||||
|
||||
src += Glob(STANDALONE_DIR+'/port/*.c')
|
||||
path += [STANDALONE_DIR + '/port/*.h']
|
||||
|
||||
# board
|
||||
src += Glob(STANDALONE_DIR+'/board/common/*.c') + Glob(STANDALONE_DIR+'/board/common/*.S')
|
||||
@@ -70,6 +73,26 @@ if GetDepend(['BSP_USING_QSPI']):
|
||||
src += Glob(STANDALONE_DIR+'/drivers/qspi/fqspi/*.c') + Glob(STANDALONE_DIR+'/drivers/qspi/fqspi/*.S')
|
||||
path += [STANDALONE_DIR + '/drivers/qspi/fqspi/']
|
||||
|
||||
## eth
|
||||
if GetDepend(['BSP_USING_ETH']):
|
||||
src += Glob(STANDALONE_DIR+'/drivers/eth/fxmac/*.c') + Glob(STANDALONE_DIR+'/drivers/eth/fxmac/*.S')
|
||||
path += [STANDALONE_DIR + '/drivers/eth/fxmac/'] + [STANDALONE_DIR + '/drivers/eth/fxmac/phy/']
|
||||
|
||||
## sdio
|
||||
if GetDepend(['BSP_USING_SDIO']):
|
||||
src += Glob(STANDALONE_DIR+'/drivers/mmc/fsdio/*.c') + Glob(STANDALONE_DIR+'/drivers/mmc/fsdio/*.S')
|
||||
path += [STANDALONE_DIR + '/drivers/mmc/fsdio/']
|
||||
|
||||
## gpio
|
||||
if GetDepend(['BSP_USING_GPIO']):
|
||||
src += Glob(STANDALONE_DIR+'/drivers/pin/fgpio/*.c') + Glob(STANDALONE_DIR+'/drivers/pin/fgpio/*.S')
|
||||
path += [STANDALONE_DIR + '/drivers/pin/fgpio/']
|
||||
|
||||
## iopad
|
||||
if GetDepend(['ENABLE_IOPAD']):
|
||||
src += Glob(STANDALONE_DIR+'/drivers/iopad/fiopad/*.c') + Glob(STANDALONE_DIR+'/drivers/iopad/fiopad/*.S')
|
||||
path += [STANDALONE_DIR + '/drivers/iopad/fiopad/']
|
||||
|
||||
# phytium ports rt-thread drivers
|
||||
PORT_DRV_DIR = cwd + '/drivers'
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ menu "On-chip Peripheral Drivers"
|
||||
|
||||
menuconfig BSP_USING_SPI
|
||||
bool "Enable Spi"
|
||||
default y
|
||||
default n
|
||||
select USE_SPI # sdk spi component
|
||||
select RT_USING_SPI
|
||||
if BSP_USING_SPI
|
||||
@@ -42,17 +42,69 @@ menu "On-chip Peripheral Drivers"
|
||||
|
||||
menuconfig BSP_USING_CAN
|
||||
bool "Enable CAN"
|
||||
default y
|
||||
default n
|
||||
select RT_USING_CAN
|
||||
select RT_CAN_USING_HDR
|
||||
select RT_CAN_USING_CANFD
|
||||
|
||||
menuconfig BSP_USING_GPIO
|
||||
bool "Enable GPIO"
|
||||
default n
|
||||
select RT_USING_PIN
|
||||
|
||||
menuconfig BSP_USING_QSPI
|
||||
bool "Enable QSPI"
|
||||
default y
|
||||
default n
|
||||
select RT_USING_QSPI
|
||||
select RT_USING_SPI
|
||||
if BSP_USING_QSPI
|
||||
config USING_QSPI_CHANNEL0
|
||||
bool "using qspi channel_0"
|
||||
default n
|
||||
config USING_QSPI_CHANNEL1
|
||||
bool "using qspi channel_1"
|
||||
default n
|
||||
endif
|
||||
|
||||
menuconfig BSP_USING_ETH
|
||||
bool "Enable ETH"
|
||||
default y
|
||||
select USE_ETH
|
||||
if BSP_USING_ETH
|
||||
config RT_LWIP_PBUF_POOL_BUFSIZE
|
||||
int "The size of each pbuf in the pbuf pool"
|
||||
range 1500 2000
|
||||
default 1700
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
menuconfig BSP_USING_SDIO
|
||||
bool "Enable SDIO"
|
||||
default y
|
||||
select RT_USING_SDIO
|
||||
|
||||
if BSP_USING_SDIO
|
||||
config BSP_USING_SDCARD_FATFS
|
||||
bool "Enable SDCARD (FATFS)"
|
||||
select RT_USING_DFS_ELMFAT
|
||||
default y
|
||||
|
||||
choice
|
||||
prompt "Choose a card to mount"
|
||||
default USING_SDIO1
|
||||
|
||||
config USING_SDIO0
|
||||
bool "Use SDIO0"
|
||||
|
||||
config USING_SDIO1
|
||||
bool "Use SDIO1"
|
||||
|
||||
config USING_EMMC
|
||||
bool "Use EMMC"
|
||||
endchoice
|
||||
endif
|
||||
endmenu
|
||||
|
||||
menu "Board extended module Drivers"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Email: opensource_embedded@phytium.com.cn
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023/7/24 liqiaozhong first add, support intr
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DRV_GPIO_H__
|
||||
#define __DRV_GPIO_H__
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,12 @@
|
||||
#ifndef __DRT_QSPI_H__
|
||||
#define __DRT_QSPI_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "rtconfig.h"
|
||||
|
||||
#ifdef RT_USING_QSPI
|
||||
#include <rtthread.h>
|
||||
#include "rtdevice.h"
|
||||
#include "fqspi_flash.h"
|
||||
#define PHYTIUM_QSPI_NAME "qspi"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -23,6 +27,14 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
rt_uint32_t fqspi_id;
|
||||
rt_uint32_t init; /* 0 is init already */
|
||||
FQspiCtrl fqspi;
|
||||
struct rt_spi_bus qspi_bus;
|
||||
} phytium_qspi_bus;
|
||||
|
||||
rt_err_t phytium_qspi_bus_attach_device(const char *bus_name, const char *device_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Email: opensource_embedded@phytium.com.cn
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023/7/11 liqiaozhong init SD card and mount file system
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DRV_SDIO_H__
|
||||
#define __DRV_SDIO_H__
|
||||
/***************************** Include Files *********************************/
|
||||
#include <rtthread.h>
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
/*******************************Api Functions*********************************/
|
||||
|
||||
#endif
|
||||
@@ -116,6 +116,9 @@ static rt_err_t spim_configure(struct rt_spi_device *device,
|
||||
RT_ASSERT(configuration != RT_NULL);
|
||||
struct drv_spi *user_data_cfg = device->parent.user_data;
|
||||
FSpimConfig input_cfg = *FSpimLookupConfig(user_data_cfg->spi_id);
|
||||
#ifdef RT_USING_SMART
|
||||
input_cfg.base_addr = (uintptr)rt_ioremap((void*)input_cfg.base_addr, 0x1000);
|
||||
#endif
|
||||
FSpimConfig *set_input_cfg = &input_cfg;
|
||||
|
||||
/* set fspim device according to configuration */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,22 +1,142 @@
|
||||
/*
|
||||
* @Copyright : (C) 2022 Phytium Information Technology, Inc.
|
||||
* All Rights Reserved.
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
|
||||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
|
||||
* either version 1.0 of the License, or (at your option) any later version.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the Phytium Public License for more details.
|
||||
* Email: opensource_embedded@phytium.com.cn
|
||||
*
|
||||
*
|
||||
* @FilePath: drv_xmac.h
|
||||
* @Date: 2023-04-19 15:19:39
|
||||
* @LastEditTime: 2023-04-19 15:19:40
|
||||
* @Description: This file is for
|
||||
*
|
||||
* @Modify History:
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-07-07 liuzhihong first commit
|
||||
* 2023-07-14 liuzhihong support RT-Smart
|
||||
*/
|
||||
#ifndef __DRV_XMAC_H__
|
||||
#define __DRV_XMAC_H__
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#include <netif/ethernetif.h>
|
||||
|
||||
#include "fxmac.h"
|
||||
#include "fkernel.h"
|
||||
#include "ferror_code.h"
|
||||
#include "fassert.h"
|
||||
#include "fcache.h"
|
||||
#include "fxmac_bdring.h"
|
||||
#include "eth_ieee_reg.h"
|
||||
#include "fcpu_info.h"
|
||||
#include "fdebug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FREERTOS_XMAC_INIT_ERROR FT_CODE_ERR(ErrModPort, 0, 0x1)
|
||||
#define FREERTOS_XMAC_PARAM_ERROR FT_CODE_ERR(ErrModPort, 0, 0x2)
|
||||
#define FREERTOS_XMAC_NO_VALID_SPACE FT_CODE_ERR(ErrModPort, 0, 0x3)
|
||||
|
||||
#define FXMAX_RX_BDSPACE_LENGTH 0x20000 /* default set 128KB*/
|
||||
#define FXMAX_TX_BDSPACE_LENGTH 0x20000 /* default set 128KB*/
|
||||
|
||||
#define FXMAX_RX_PBUFS_LENGTH 16
|
||||
#define FXMAX_TX_PBUFS_LENGTH 16
|
||||
|
||||
#define FXMAX_MAX_HARDWARE_ADDRESS_LENGTH 6
|
||||
|
||||
/* configuration */
|
||||
#define FXMAC_OS_CONFIG_JUMBO BIT(0)
|
||||
#define FXMAC_OS_CONFIG_MULTICAST_ADDRESS_FILITER BIT(1) /* Allow multicast address filtering */
|
||||
#define FXMAC_OS_CONFIG_COPY_ALL_FRAMES BIT(2) /* enable copy all frames */
|
||||
#define FXMAC_OS_CONFIG_CLOSE_FCS_CHECK BIT(3) /* close fcs check */
|
||||
#define FXMAC_OS_CONFIG_RX_POLL_RECV BIT(4) /* select poll mode */
|
||||
/* Phy */
|
||||
#define FXMAC_PHY_SPEED_10M 10
|
||||
#define FXMAC_PHY_SPEED_100M 100
|
||||
#define FXMAC_PHY_SPEED_1000M 1000
|
||||
|
||||
#define FXMAC_PHY_HALF_DUPLEX 0
|
||||
#define FXMAC_PHY_FULL_DUPLEX 1
|
||||
|
||||
#define MAX_FRAME_SIZE_JUMBO (FXMAC_MTU_JUMBO + FXMAC_HDR_SIZE + FXMAC_TRL_SIZE)
|
||||
|
||||
/* Byte alignment of BDs */
|
||||
#define BD_ALIGNMENT (FXMAC_DMABD_MINIMUM_ALIGNMENT*2)
|
||||
|
||||
/* frame queue */
|
||||
#define PQ_QUEUE_SIZE 4096
|
||||
|
||||
#define LINK_THREAD_STACK_LENGTH 0x20400
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uintptr data[PQ_QUEUE_SIZE];
|
||||
int head, tail, len;
|
||||
} PqQueue;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FXMAC_OS_INTERFACE_SGMII = 0,
|
||||
FXMAC_OS_INTERFACE_RMII,
|
||||
FXMAC_OS_INTERFACE_RGMII,
|
||||
FXMAC_OS_INTERFACE_LENGTH
|
||||
} FXmacRtThreadInterface;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 rx_bdspace[FXMAX_RX_BDSPACE_LENGTH] __attribute__((aligned(128))); /* 接收bd 缓冲区 */
|
||||
u8 tx_bdspace[FXMAX_RX_BDSPACE_LENGTH] __attribute__((aligned(128))); /* 发送bd 缓冲区 */
|
||||
|
||||
uintptr rx_pbufs_storage[FXMAX_RX_PBUFS_LENGTH];
|
||||
uintptr tx_pbufs_storage[FXMAX_TX_PBUFS_LENGTH];
|
||||
|
||||
} FXmacNetifBuffer;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u32 instance_id;
|
||||
FXmacRtThreadInterface interface;
|
||||
u32 autonegotiation; /* 1 is autonegotiation ,0 is manually set */
|
||||
u32 phy_speed; /* FXMAC_PHY_SPEED_XXX */
|
||||
u32 phy_duplex; /* FXMAC_PHY_XXX_DUPLEX */
|
||||
} FXmacOsControl;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct eth_device parent; /* inherit from ethernet device */
|
||||
|
||||
FXmac instance; /* Xmac controller */
|
||||
FXmacOsControl mac_config;
|
||||
|
||||
FXmacNetifBuffer buffer; /* DMA buffer */
|
||||
|
||||
/* queue to store overflow packets */
|
||||
PqQueue recv_q;
|
||||
PqQueue send_q;
|
||||
|
||||
/* configuration */
|
||||
u32 config;
|
||||
|
||||
rt_uint8_t hwaddr[FXMAX_MAX_HARDWARE_ADDRESS_LENGTH]; /* MAC address */
|
||||
|
||||
struct rt_thread _link_thread; /* link detect thread */
|
||||
rt_uint8_t _link_thread_stack[LINK_THREAD_STACK_LENGTH];/* link detect thread stack*/
|
||||
} FXmacOs;
|
||||
|
||||
enum lwip_port_link_status
|
||||
{
|
||||
ETH_LINK_UNDEFINED = 0,
|
||||
ETH_LINK_UP,
|
||||
ETH_LINK_DOWN,
|
||||
ETH_LINK_NEGOTIATING
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Email: opensource_embedded@phytium.com.cn
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-11-20 liqiaozhong first commit
|
||||
* 2022-03-08 liqiaozhong add format function and mount table
|
||||
*/
|
||||
#include <rtthread.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined (RT_USING_SFUD) && defined(RT_USING_DFS)
|
||||
|
||||
#include <dfs_fs.h>
|
||||
#include <dfs_file.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statfs.h>
|
||||
#include "spi_flash.h"
|
||||
#include "spi_flash_sfud.h"
|
||||
|
||||
#include "fdebug.h"
|
||||
#include "fparameters_comm.h"
|
||||
|
||||
#include "fspim.h"
|
||||
/************************** Variable Definitions *****************************/
|
||||
sfud_flash_t spim_flash = RT_NULL;
|
||||
const struct dfs_mount_tbl mount_table[] =
|
||||
{
|
||||
{ "flash2", "/", "elm", 0, RT_NULL },
|
||||
{0},
|
||||
};
|
||||
/***************** Macros (Inline Fungoctions) Definitions *********************/
|
||||
#define FSPIM_DEBUG_TAG "SPIM"
|
||||
#define FSPIM_ERROR(format, ...) FT_DEBUG_PRINT_E(FSPIM_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
#define FSPIM_WARN(format, ...) FT_DEBUG_PRINT_W(FSPIM_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
#define FSPIM_INFO(format, ...) FT_DEBUG_PRINT_I(FSPIM_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
#define FSPIM_DEBUG(format, ...) FT_DEBUG_PRINT_D(FSPIM_DEBUG_TAG, format, ##__VA_ARGS__)
|
||||
|
||||
/*******************************Api Functions*********************************/
|
||||
static int spi_flash_sfud_init(void)
|
||||
{
|
||||
if (RT_NULL == rt_sfud_flash_probe("flash2", "spi02"))
|
||||
{
|
||||
rt_kprintf("rt_sfud_flash_probe failed\n");
|
||||
return RT_ERROR;
|
||||
}
|
||||
spim_flash = rt_sfud_flash_find_by_dev_name("flash2");
|
||||
if (RT_NULL == spim_flash)
|
||||
{
|
||||
rt_kprintf("Flash init failed -> can't find flash2 device!\n");
|
||||
return RT_ERROR;
|
||||
}
|
||||
rt_kprintf("Spi flash device flash2 init\n");
|
||||
rt_kprintf("Flash device: flash2 info\nmf_id: 0x%x\ntype_id: 0x%x\ncapacity_id: 0x%x\nerase granularity: %lu\n",
|
||||
spim_flash->chip.mf_id,
|
||||
spim_flash->chip.type_id,
|
||||
spim_flash->chip.capacity_id,
|
||||
spim_flash->chip.erase_gran);
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_DEVICE_EXPORT(spi_flash_sfud_init);
|
||||
|
||||
/* format the flash with elm environment */
|
||||
static int flash_format_operation(void)
|
||||
{
|
||||
int result = RT_EOK;
|
||||
result = dfs_mkfs("elm", "flash2");
|
||||
return result;
|
||||
}
|
||||
INIT_ENV_EXPORT(flash_format_operation);
|
||||
|
||||
#endif /* RT_USING_SFUD || RT_USING_DFS */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,21 +8,31 @@ menu "Board Configuration"
|
||||
|
||||
config TARGET_F2000_4
|
||||
bool "FT2000-4"
|
||||
select USE_SERIAL
|
||||
select ENABLE_Pl011_UART
|
||||
|
||||
config TARGET_D2000
|
||||
bool "D2000"
|
||||
select USE_SERIAL
|
||||
select ENABLE_Pl011_UART
|
||||
|
||||
config TARGET_E2000Q
|
||||
bool "E2000Q"
|
||||
select TARGET_E2000
|
||||
select USE_SERIAL
|
||||
select ENABLE_Pl011_UART
|
||||
|
||||
config TARGET_E2000D
|
||||
bool "E2000D"
|
||||
select TARGET_E2000
|
||||
select USE_SERIAL
|
||||
select ENABLE_Pl011_UART
|
||||
|
||||
config TARGET_E2000S
|
||||
bool "E2000S"
|
||||
select TARGET_E2000
|
||||
select USE_SERIAL
|
||||
select ENABLE_Pl011_UART
|
||||
|
||||
# config TARGET_TARDIGRADE
|
||||
# bool "TARDIGRADE"
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright : (C) 2022 Phytium Information Technology, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
|
||||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
|
||||
* either version 1.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the Phytium Public License for more details.
|
||||
*
|
||||
*
|
||||
* FilePath: fsmp.c
|
||||
* Date: 2022-02-10 14:53:42
|
||||
* LastEditTime: 2022-02-17 17:58:14
|
||||
* Description: This files is for a way to provide spinlocks for multicore operations
|
||||
*
|
||||
* Modify History:
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------
|
||||
* v1.1 carl 2022-12-30 add init function
|
||||
* v1.2 cark 2023-02-28 Use GCC built-in functions to implement spinlock
|
||||
*/
|
||||
|
||||
#if 0
|
||||
|
||||
#include "fsmp.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "ftypes.h"
|
||||
#include "fatomic.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int v;
|
||||
}FCpuLock;
|
||||
|
||||
|
||||
#ifdef CONFIG_SPIN_MEM
|
||||
FCpuLock *_lock = (FCpuLock *)CONFIG_SPIN_MEM;
|
||||
#else
|
||||
FCpuLock _static_lock ;
|
||||
FCpuLock *_lock = &_static_lock ;
|
||||
#endif
|
||||
|
||||
|
||||
void SpinUnlock(void)
|
||||
{
|
||||
FATOMIC_UNLOCK(_lock->v);
|
||||
}
|
||||
|
||||
void SpinLock(void)
|
||||
{
|
||||
|
||||
while(FATOMIC_LOCK(_lock->v,1))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SpinInit(void)
|
||||
{
|
||||
FATOMIC_UNLOCK(_lock->v);
|
||||
}
|
||||
|
||||
#endif
|
||||
+15
-13
@@ -11,34 +11,36 @@
|
||||
* See the Phytium Public License for more details.
|
||||
*
|
||||
*
|
||||
* FilePath: fpsci.h
|
||||
* Date: 2022-02-10 14:53:41
|
||||
* LastEditTime: 2022-02-17 17:30:40
|
||||
* Description: This file is for cpu energy management
|
||||
* FilePath: fsmp.h
|
||||
* Date: 2022-02-10 14:53:42
|
||||
* LastEditTime: 2022-02-17 17:58:18
|
||||
* Description: This file is for spinlock function
|
||||
*
|
||||
* Modify History:
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------
|
||||
* 1.0 huanghe 2021/7/3 first release
|
||||
* 1.0 carl 2023-02-28 Use GCC built-in functions to implement spinlock
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ARCH_ARMV8_AARCH32_PSCI_H
|
||||
#define ARCH_ARMV8_AARCH32_PSCI_H
|
||||
#ifndef BSP_BOARD_COMMON_SMP_H
|
||||
#define BSP_BOARD_COMMON_SMP_H
|
||||
|
||||
#include "ftypes.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "ftypes.h"
|
||||
#include "ferror_code.h"
|
||||
|
||||
FError PsciCpuOn(s32 cpu_id_mask, uintptr bootaddr);
|
||||
void PsciCpuReset(void);
|
||||
void SpinInit(void);
|
||||
void SpinLock(void);
|
||||
void SpinUnlock(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !
|
||||
|
||||
#endif // DEBUG
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* Copyright : (C) 2022 Phytium Information Technology, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
|
||||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
|
||||
* either version 1.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the Phytium Public License for more details.
|
||||
*
|
||||
*
|
||||
* FilePath: fioctrl.h
|
||||
* Date: 2022-02-10 14:53:42
|
||||
* LastEditTime: 2022-02-18 08:25:35
|
||||
* Description: This files is for io-ctrl function definition (io-mux/io-config/io-delay)
|
||||
*
|
||||
* Modify History:
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------
|
||||
* 1.0 zhugengyu 2022/2/22 init commit
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOARD_D2000_FIOCTRL_H
|
||||
#define BOARD_D2000_FIOCTRL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
#include "ftypes.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
#define FIOCTRL_INDEX(offset, func_beg) \
|
||||
{ \
|
||||
/* reg_off */ (offset), \
|
||||
/* reg_bit */ (func_beg) \
|
||||
}
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
#define FIOCTRL_CRU_CLK_OBV_PAD (FPinIndex)FIOCTRL_INDEX(0x200, 24)
|
||||
#define FIOCTRL_SPI0_CSN0_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 16)
|
||||
#define FIOCTRL_SPI0_SCK_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 12)
|
||||
#define FIOCTRL_SPI0_SO_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 8)
|
||||
#define FIOCTRL_SPI0_SI_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 4)
|
||||
|
||||
#define FIOCTRL_TJTAG_TDI_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 24) /* can0-tx: func 1 */
|
||||
#define FIOCTRL_SWDITMS_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 12) /* can0-rx: func 1 */
|
||||
|
||||
#define FIOCTRL_NTRST_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 20) /* can1-tx: func 1 */
|
||||
#define FIOCTRL_SWDO_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 8) /* can1-rx: func 1 */
|
||||
|
||||
#define FIOCTRL_I2C0_SCL_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 24) /* i2c0-scl: func 0 */
|
||||
#define FIOCTRL_I2C0_SDA_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 20) /* i2c0-sda: func 0 */
|
||||
#define FIOCTRL_ALL_PLL_LOCK_PAD (FPinIndex)FIOCTRL_INDEX(0x200, 28) /* i2c1-scl: func 2 */
|
||||
#define FIOCTRL_CRU_CLK_OBV_PAD (FPinIndex)FIOCTRL_INDEX(0x200, 24) /* i2c1-sda: func 2 */
|
||||
#define FIOCTRL_SWDO_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 8) /* i2c2-scl: func 2 */
|
||||
#define FIOCTRL_TDO_SWJ_IN_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 4) /* i2c2-sda: func 2 */
|
||||
#define FIOCTRL_HDT_MB_DONE_STATE_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 0) /* i2c3-scl: func 2 */
|
||||
#define FIOCTRL_HDT_MB_FAIL_STATE_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 28) /* i2c3-sda: func 2 */
|
||||
|
||||
#define FIOCTRL_UART_2_RXD_PAD (FPinIndex)FIOCTRL_INDEX(0x210, 0) /* spi1_csn0: func 1 */
|
||||
#define FIOCTRL_UART_2_TXD_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 28) /* spi1_sck: func 1 */
|
||||
#define FIOCTRL_UART_3_RXD_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 24) /* spi1_so: func 1 */
|
||||
#define FIOCTRL_UART_3_TXD_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 20) /* spi1_si: func 1 */
|
||||
#define FIOCTRL_QSPI_CSN2_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 8) /* spi1_csn1: func 1 */
|
||||
#define FIOCTRL_QSPI_CSN3_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 4) /* spi1_csn2: func 1 */
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@ extern "C"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
/* CACHE */
|
||||
#define CACHE_LINE_ADDR_MASK 0x3FU
|
||||
#define CACHE_LINE_ADDR_MASK 0x3FUL
|
||||
#define CACHE_LINE 64U
|
||||
|
||||
/* DEVICE Register Address */
|
||||
@@ -141,12 +141,6 @@ enum
|
||||
#define FSCMI_MAX_PERF_DOMAINS 3
|
||||
#define FSCMI_MAX_OPPS 4
|
||||
|
||||
/* Generic Timer */
|
||||
#define GENERIC_TIMER_CLK_FREQ_MHZ 48U
|
||||
#define GENERIC_TIMER_NS_IRQ_NUM 30U
|
||||
#define GENERIC_TIMER_NS_CLK_FREQ 2000000U
|
||||
#define COUNTS_PER_SECOND GENERIC_TIMER_NS_CLK_FREQ
|
||||
|
||||
/* UART */
|
||||
#define FUART_NUM 4U
|
||||
#define FUART_REG_LENGTH 0x18000U
|
||||
@@ -312,6 +306,18 @@ enum
|
||||
|
||||
#define FXMAC_PHY_MAX_NUM 32U
|
||||
|
||||
#define FXMAC_CLK_TYPE_0
|
||||
|
||||
#if !defined(__ASSEMBLER__)
|
||||
/* IOPAD */
|
||||
enum
|
||||
{
|
||||
FIOPAD0_ID = 0,
|
||||
|
||||
FIOPAD_NUM
|
||||
};
|
||||
#endif
|
||||
|
||||
/* QSPI */
|
||||
#if !defined(__ASSEMBLER__)
|
||||
enum
|
||||
@@ -342,7 +348,7 @@ enum
|
||||
|
||||
/* TIMER and TACHO */
|
||||
#define FTIMER_NUM 38U
|
||||
#define FTIMER_CLK_FREQ_HZ 50000000U /* 50MHz */
|
||||
#define FTIMER_CLK_FREQ_HZ 50000000ULL /* 50MHz */
|
||||
#define FTIMER_TICK_PERIOD_NS 20U /* 20ns */
|
||||
#define FTIMER_TACHO_IRQ_NUM(n) (226U + (n))
|
||||
#define FTIMER_TACHO_BASE_ADDR(n) (0x28054000U + 0x1000U * (n))
|
||||
@@ -533,6 +539,41 @@ enum
|
||||
#define FDDMA0_SPIM2_RX_SLAVE_ID 21U /* spi2 rx slave-id */
|
||||
#define FDDMA0_SPIM3_RX_SLAVE_ID 22U /* spi3 rx slave-id */
|
||||
|
||||
/* FDDMA1_ID */
|
||||
#define FDDMA1_MIO0_TX_SLAVE_ID 0U /* mio0 rx slave-id */
|
||||
#define FDDMA1_MIO1_TX_SLAVE_ID 1U /* mio1 rx slave-id */
|
||||
#define FDDMA1_MIO2_TX_SLAVE_ID 2U /* mio2 rx slave-id */
|
||||
#define FDDMA1_MIO3_TX_SLAVE_ID 3U /* mio3 rx slave-id */
|
||||
#define FDDMA1_MIO4_TX_SLAVE_ID 4U /* mio4 rx slave-id */
|
||||
#define FDDMA1_MIO5_TX_SLAVE_ID 5U /* mio5 rx slave-id */
|
||||
#define FDDMA1_MIO6_TX_SLAVE_ID 6U /* mio6 rx slave-id */
|
||||
#define FDDMA1_MIO7_TX_SLAVE_ID 7U /* mio7 rx slave-id */
|
||||
#define FDDMA1_MIO8_TX_SLAVE_ID 8U /* mio8 rx slave-id */
|
||||
#define FDDMA1_MIO9_TX_SLAVE_ID 9U /* mio9 rx slave-id */
|
||||
#define FDDMA1_MIO10_TX_SLAVE_ID 10U /* mio10 rx slave-id */
|
||||
#define FDDMA1_MIO11_TX_SLAVE_ID 11U /* mio11 rx slave-id */
|
||||
#define FDDMA1_MIO12_TX_SLAVE_ID 12U /* mio12 rx slave-id */
|
||||
#define FDDMA1_MIO13_TX_SLAVE_ID 13U /* mio13 rx slave-id */
|
||||
#define FDDMA1_MIO14_TX_SLAVE_ID 14U /* mio14 rx slave-id */
|
||||
#define FDDMA1_MIO15_TX_SLAVE_ID 15U /* mio15 rx slave-id */
|
||||
|
||||
#define FDDMA1_MIO0_RX_SLAVE_ID 16U /* mio0 tx slave-id */
|
||||
#define FDDMA1_MIO1_RX_SLAVE_ID 17U /* mio1 tx slave-id */
|
||||
#define FDDMA1_MIO2_RX_SLAVE_ID 18U /* mio2 tx slave-id */
|
||||
#define FDDMA1_MIO3_RX_SLAVE_ID 19U /* mio3 tx slave-id */
|
||||
#define FDDMA1_MIO4_RX_SLAVE_ID 20U /* mio4 tx slave-id */
|
||||
#define FDDMA1_MIO5_RX_SLAVE_ID 21U /* mio5 tx slave-id */
|
||||
#define FDDMA1_MIO6_RX_SLAVE_ID 22U /* mio6 tx slave-id */
|
||||
#define FDDMA1_MIO7_RX_SLAVE_ID 23U /* mio7 tx slave-id */
|
||||
#define FDDMA1_MIO8_RX_SLAVE_ID 24U /* mio8 tx slave-id */
|
||||
#define FDDMA1_MIO9_RX_SLAVE_ID 25U /* mio9 tx slave-id */
|
||||
#define FDDMA1_MIO10_RX_SLAVE_ID 26U /* mio10 tx slave-id */
|
||||
#define FDDMA1_MIO11_RX_SLAVE_ID 27U /* mio11 tx slave-id */
|
||||
#define FDDMA1_MIO12_RX_SLAVE_ID 28U /* mio12 tx slave-id */
|
||||
#define FDDMA1_MIO13_RX_SLAVE_ID 29U /* mio13 tx slave-id */
|
||||
#define FDDMA1_MIO14_RX_SLAVE_ID 30U /* mio14 tx slave-id */
|
||||
#define FDDMA1_MIO15_RX_SLAVE_ID 31U /* mio15 tx slave-id */
|
||||
|
||||
#define FDDMA_MIN_SLAVE_ID 0U
|
||||
#define FDDMA_MAX_SLAVE_ID 31U
|
||||
|
||||
@@ -657,6 +698,23 @@ typedef enum
|
||||
|
||||
#define FDCDP_IRQ_NUM 76
|
||||
|
||||
/* generic timer */
|
||||
/* non-secure physical timer int id */
|
||||
#define GENERIC_TIMER_NS_IRQ_NUM 30U
|
||||
|
||||
/* virtual timer int id */
|
||||
#define GENERIC_VTIMER_IRQ_NUM 27U
|
||||
|
||||
#if !defined(__ASSEMBLER__)
|
||||
enum
|
||||
{
|
||||
GENERIC_TIMER_ID0 = 0, /* non-secure physical timer */
|
||||
GENERIC_TIMER_ID1 = 1, /* virtual timer */
|
||||
|
||||
GENERIC_TIMER_NUM
|
||||
};
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Copyright : (C) 2022 Phytium Information Technology, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
|
||||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
|
||||
* either version 1.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the Phytium Public License for more details.
|
||||
*
|
||||
*
|
||||
* FilePath: fioctrl.h
|
||||
* Date: 2022-02-10 14:53:42
|
||||
* LastEditTime: 2022-02-18 08:25:35
|
||||
* Description: This files is for io-ctrl function definition (io-mux/io-config/io-delay)
|
||||
*
|
||||
* Modify History:
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------
|
||||
* 1.0 zhugengyu 2022/2/22 init commit
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOARD_D2000_FIOCTRL_H
|
||||
#define BOARD_D2000_FIOCTRL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
#include "ftypes.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
#define FIOCTRL_INDEX(offset, func_beg) \
|
||||
{ \
|
||||
/* reg_off */ (offset), \
|
||||
/* reg_bit */ (func_beg) \
|
||||
}
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
#define FIOCTRL_CRU_CLK_OBV_PAD (FPinIndex)FIOCTRL_INDEX(0x200, 24)
|
||||
#define FIOCTRL_SPI0_CSN0_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 16)
|
||||
#define FIOCTRL_SPI0_SCK_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 12)
|
||||
#define FIOCTRL_SPI0_SO_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 8)
|
||||
#define FIOCTRL_SPI0_SI_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 4)
|
||||
|
||||
#define FIOCTRL_TJTAG_TDI_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 24) /* can0-tx: func 1 */
|
||||
#define FIOCTRL_SWDITMS_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 12) /* can0-rx: func 1 */
|
||||
|
||||
#define FIOCTRL_NTRST_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 20) /* can1-tx: func 1 */
|
||||
#define FIOCTRL_SWDO_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 8) /* can1-rx: func 1 */
|
||||
|
||||
#define FIOCTRL_I2C0_SCL_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 24) /* i2c0-scl: func 0 */
|
||||
#define FIOCTRL_I2C0_SDA_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 20) /* i2c0-sda: func 0 */
|
||||
#define FIOCTRL_ALL_PLL_LOCK_PAD (FPinIndex)FIOCTRL_INDEX(0x200, 28) /* i2c1-scl: func 2 */
|
||||
#define FIOCTRL_CRU_CLK_OBV_PAD (FPinIndex)FIOCTRL_INDEX(0x200, 24) /* i2c1-sda: func 2 */
|
||||
#define FIOCTRL_SWDO_SWJ_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 8) /* i2c2-scl: func 2 */
|
||||
#define FIOCTRL_TDO_SWJ_IN_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 4) /* i2c2-sda: func 2 */
|
||||
#define FIOCTRL_HDT_MB_DONE_STATE_PAD (FPinIndex)FIOCTRL_INDEX(0x204, 0) /* i2c3-scl: func 2 */
|
||||
#define FIOCTRL_HDT_MB_FAIL_STATE_PAD (FPinIndex)FIOCTRL_INDEX(0x208, 28) /* i2c3-sda: func 2 */
|
||||
|
||||
#define FIOCTRL_UART_2_RXD_PAD (FPinIndex)FIOCTRL_INDEX(0x210, 0) /* spi1_csn0: func 1 */
|
||||
#define FIOCTRL_UART_2_TXD_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 28) /* spi1_sck: func 1 */
|
||||
#define FIOCTRL_UART_3_RXD_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 24) /* spi1_so: func 1 */
|
||||
#define FIOCTRL_UART_3_TXD_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 20) /* spi1_si: func 1 */
|
||||
#define FIOCTRL_QSPI_CSN2_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 8) /* spi1_csn1: func 1 */
|
||||
#define FIOCTRL_QSPI_CSN3_PAD (FPinIndex)FIOCTRL_INDEX(0x214, 4) /* spi1_csn2: func 1 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
menu "Sdk common configuration"
|
||||
choice DEBUG_LOG_LEVEL
|
||||
prompt "Debug Log Level"
|
||||
prompt "Debug log level"
|
||||
default LOG_ERROR
|
||||
help
|
||||
VERBOS: Print bigger chunks of debugging information
|
||||
@@ -11,20 +10,40 @@ choice DEBUG_LOG_LEVEL
|
||||
ERROR: Print critical errors, software module can not recover on its own
|
||||
|
||||
config LOG_VERBOS
|
||||
bool "VERBOS"
|
||||
bool "Verbos"
|
||||
config LOG_DEBUG
|
||||
bool "DEBUG"
|
||||
bool "Debug"
|
||||
config LOG_INFO
|
||||
bool "INFO"
|
||||
bool "Info"
|
||||
config LOG_WARN
|
||||
bool "WARN"
|
||||
bool "Warn"
|
||||
config LOG_ERROR
|
||||
bool "ERROR"
|
||||
bool "Error"
|
||||
config LOG_NONE
|
||||
bool "NONE"
|
||||
bool "None"
|
||||
|
||||
endchoice # DEBUG_LOG_LEVEL
|
||||
|
||||
config LOG_EXTRA_INFO
|
||||
bool "Debug log with extra info"
|
||||
default n
|
||||
help
|
||||
Print debug information with source file name and source code line num.
|
||||
|
||||
config LOG_DISPALY_CORE_NUM
|
||||
bool "Debug display with core"
|
||||
default n
|
||||
help
|
||||
To display CPU core information during debugging
|
||||
|
||||
config BOOTUP_DEBUG_PRINTS
|
||||
bool
|
||||
prompt "Bootup debug"
|
||||
default n
|
||||
help
|
||||
Enable Bootup debug printing
|
||||
|
||||
|
||||
|
||||
config USE_DEFAULT_INTERRUPT_CONFIG
|
||||
bool
|
||||
@@ -40,30 +59,12 @@ config USE_DEFAULT_INTERRUPT_CONFIG
|
||||
"Select Interrupt role"
|
||||
|
||||
config INTERRUPT_ROLE_MASTER
|
||||
bool "use master role"
|
||||
bool "Use master role"
|
||||
|
||||
config INTERRUPT_ROLE_SLAVE
|
||||
bool "use slave role"
|
||||
bool "Use slave role"
|
||||
|
||||
endchoice # INTERRUPT_ROLE_SELECT
|
||||
endif
|
||||
|
||||
config LOG_EXTRA_INFO
|
||||
bool "Debug Log with Extra Info"
|
||||
default n
|
||||
help
|
||||
Print debug information with source file name and source code line num.
|
||||
|
||||
config LOG_DISPALY_CORE_NUM
|
||||
bool "Debug Display with Core"
|
||||
default n
|
||||
help
|
||||
To display CPU core information during debugging
|
||||
|
||||
config BOOTUP_DEBUG_PRINTS
|
||||
bool
|
||||
prompt "Bootup debug"
|
||||
default n
|
||||
help
|
||||
Enable Bootup debug printing
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
#include "fsmp.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USE_AMP)
|
||||
#include "fcpu_info.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -133,7 +131,7 @@ typedef enum
|
||||
{ \
|
||||
if (LOG_LOCAL_LEVEL < log_level) \
|
||||
break; \
|
||||
DISPALY_CORE_NUM() \
|
||||
DISPALY_CORE_NUM(); \
|
||||
PORT_KPRINTF(LOG_FORMAT(log_tag_letter, format" @%s:%d"), tag, ##__VA_ARGS__, __FILENAME__, __LINE__); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,18 +26,27 @@
|
||||
#define FELF_H
|
||||
|
||||
#include "ftypes.h"
|
||||
#include "ferror_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#define FELF_SUCCESS FT_SUCCESS /* SUCCESS */
|
||||
#define FELF_SECTION_NO_STRTAB FT_MAKE_ERRCODE(ErrorModGeneral, ErrElf, 1) /* There is no string table */
|
||||
#define FELF_SECTION_NO_SPACE FT_MAKE_ERRCODE(ErrorModGeneral, ErrElf, 2) /* There is no space section */
|
||||
#define FELF_SECTION_NOT_FIT FT_MAKE_ERRCODE(ErrorModGeneral, ErrElf, 3) /* No corresponding section was matched */
|
||||
#define FELF_SECTION_GET_ERROR FT_MAKE_ERRCODE(ErrorModGeneral, ErrElf, 3)
|
||||
|
||||
unsigned long ElfLoadElfImagePhdr(unsigned long addr);
|
||||
unsigned long ElfLoadElfImageShdr(unsigned long addr);
|
||||
int ElfIsImageValid(unsigned long addr);
|
||||
unsigned long ElfExecBootElf(unsigned long (*entry)(int, char *const[]),
|
||||
int argc, char *const argv[]);
|
||||
|
||||
FError ElfGetSection(unsigned long addr, char *section_name, u8 *data_get, u32 *length_p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,7 @@ typedef enum
|
||||
ErrCommGeneral = 0,
|
||||
ErrCommMemp,
|
||||
ErrInterrupt,
|
||||
ErrElf,
|
||||
} FtErrCodeCommMask;
|
||||
|
||||
/* BSP模块的错误子模块定义 */
|
||||
@@ -86,6 +87,7 @@ typedef enum
|
||||
ErrSema,
|
||||
ErrBspMEDIA,
|
||||
ErrBspMhu,
|
||||
ErrBspIOPad,
|
||||
|
||||
ErrBspModMaxMask = 255
|
||||
} FtErrCodeBspMask;
|
||||
|
||||
@@ -34,24 +34,7 @@ extern "C"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#if defined(CONFIG_TARGET_F2000_4) || defined(CONFIG_TARGET_D2000)
|
||||
#ifndef FPIN_IO_CTRL
|
||||
#define FPIN_IO_CTRL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TARGET_E2000) || defined(CONFIG_TARGET_TARDIGRADE)
|
||||
#ifndef FPIN_IO_PAD
|
||||
#define FPIN_IO_PAD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(FPIN_IO_CTRL)
|
||||
#include "fioctrl.h"
|
||||
#endif
|
||||
|
||||
#if defined(FPIN_IO_PAD)
|
||||
#include "fiopad.h"
|
||||
#endif
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
@@ -61,39 +44,10 @@ typedef enum
|
||||
FPIN_FUNC1,
|
||||
FPIN_FUNC2,
|
||||
FPIN_FUNC3 = 0b011,
|
||||
#if defined(FPIN_IO_PAD) /* E2000 support more pin func */
|
||||
FPIN_FUNC4,
|
||||
FPIN_FUNC5,
|
||||
FPIN_FUNC6,
|
||||
FPIN_FUNC7 = 0b111,
|
||||
#endif
|
||||
|
||||
FPIN_NUM_OF_FUNC
|
||||
} FPinFunc; /* 引脚复用功能配置, func0为默认功能 */
|
||||
|
||||
#if defined(FPIN_IO_PAD) /* Only support driver strength config in E2000 */
|
||||
typedef enum
|
||||
{
|
||||
FPIN_DRV0 = 0b0000,
|
||||
FPIN_DRV1,
|
||||
FPIN_DRV2,
|
||||
FPIN_DRV3,
|
||||
FPIN_DRV4,
|
||||
FPIN_DRV5,
|
||||
FPIN_DRV6,
|
||||
FPIN_DRV7,
|
||||
FPIN_DRV8,
|
||||
FPIN_DRV9,
|
||||
FPIN_DRV10,
|
||||
FPIN_DRV11,
|
||||
FPIN_DRV12,
|
||||
FPIN_DRV13,
|
||||
FPIN_DRV14,
|
||||
FPIN_DRV15 = 0b1111,
|
||||
|
||||
FPIN_NUM_OF_DRIVE
|
||||
} FPinDrive; /* 引脚驱动能力配置 */
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FPIN_PULL_NONE = 0b00,
|
||||
@@ -162,29 +116,12 @@ FPinPull FPinGetPull(const FPinIndex pin);
|
||||
/* 设置IO引脚的上下拉 */
|
||||
void FPinSetPull(const FPinIndex pin, FPinPull pull);
|
||||
|
||||
#if defined(FPIN_IO_PAD)
|
||||
/* 获取IO引脚的驱动能力 */
|
||||
FPinDrive FPinGetDrive(const FPinIndex pin);
|
||||
|
||||
/* 设置IO引脚的驱动能力 */
|
||||
void FPinSetDrive(const FPinIndex pin, FPinDrive drive);
|
||||
|
||||
/* 获取IO引脚的复用、上下拉和驱动能力设置 */
|
||||
void FPinGetConfig(const FPinIndex pin, FPinFunc *func, FPinPull *pull, FPinDrive *drive);
|
||||
|
||||
/* 设置IO引脚的复用、上下拉和驱动能力 */
|
||||
void FPinSetConfig(const FPinIndex pin, FPinFunc func, FPinPull pull, FPinDrive drive);
|
||||
|
||||
#else
|
||||
|
||||
/* 获取IO引脚的复用、上下拉和驱动能力设置 */
|
||||
void FPinGetConfig(const FPinIndex pin, FPinFunc *func, FPinPull *pull);
|
||||
|
||||
/* 设置IO引脚的复用、上下拉和驱动能力 */
|
||||
void FPinSetConfig(const FPinIndex pin, FPinFunc func, FPinPull pull);
|
||||
|
||||
#endif
|
||||
|
||||
/* 获取IO引脚当前的单项延时设置 */
|
||||
FPinDelay FPinGetDelay(const FPinIndex pin, FPinDelayDir dir, FPinDelayType type);
|
||||
|
||||
@@ -208,4 +145,5 @@ void FPinGetDelayConfig(const FPinIndex pin, FPinDelay *in_roungh_delay, FPinDel
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -404,7 +404,7 @@ start:
|
||||
}
|
||||
}
|
||||
|
||||
static void f_vprintf(const char *restrict format, va_list vargs)
|
||||
static int f_vprintf(const char *restrict format, va_list vargs)
|
||||
{
|
||||
struct str_context ctx = {0};
|
||||
cbvprintf(char_out, &ctx, format, vargs);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright : (C) 2023 Phytium Information Technology, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
|
||||
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
|
||||
* either version 1.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the Phytium Public License for more details.
|
||||
*
|
||||
*
|
||||
* FilePath: fpsci.h
|
||||
* Created Date: 2023-06-21 16:13:14
|
||||
* Last Modified: 2023-06-27 15:33:23
|
||||
* Description: This file is for
|
||||
*
|
||||
* Modify History:
|
||||
* Ver Who Date Changes
|
||||
* ----- ---------- -------- ---------------------------------
|
||||
* 1.0 huanghe 2023-06-21 first release
|
||||
*/
|
||||
|
||||
#ifndef FPSCI_H
|
||||
#define FPSCI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#include "ftypes.h"
|
||||
|
||||
/* 版本掩码 */
|
||||
|
||||
#define FPSCI_VERSION_MASK 0x0000FFFF
|
||||
#define FPSCI_MAJOR_VERSION(x) ((x) >> 16)
|
||||
#define FPSCI_MINOR_VERSION(x) ((x) & 0xFFFF)
|
||||
|
||||
/* Power State 参数 */
|
||||
|
||||
#define FPSCI_POWER_STATE_ID_MASK 0xFFFF
|
||||
#define FPSCI_POWER_STATE_ID_SHIFT 0
|
||||
#define FPSCI_POWER_STATE_TYPE_SHIFT 16
|
||||
#define FPSCI_POWER_STATE_AFFL_SHIFT 24
|
||||
|
||||
/* stateid encoding */
|
||||
#define FPSCI_STATEID_CORE_RETENTION 0x2
|
||||
#define FPSCI_STATEID_CORE_POWERDOWN 0x8
|
||||
|
||||
|
||||
/* 版本掩码 */
|
||||
|
||||
#define FPSCI_VERSION_MASK 0x0000FFFF
|
||||
|
||||
|
||||
/* 定义复位模式 */
|
||||
|
||||
#define FPSCI_SYSTEM_RESET_TYPE_COLD 0
|
||||
#define FPSCI_SYSTEM_RESET_TYPE_WARM 1
|
||||
|
||||
/* 定义PSCI 错误码 */
|
||||
|
||||
#define FPSCI_SUCCESS 0
|
||||
#define FPSCI_NOT_SUPPORTED -1
|
||||
#define FPSCI_INVALID_PARAMS -2
|
||||
#define FPSCI_DENIED -3
|
||||
#define FPSCI_ALREADY_ON -4
|
||||
#define FPSCI_ON_PENDING -5
|
||||
#define FPSCI_INTERNAL_FAILURE -6
|
||||
#define FPSCI_NOT_PRESENT -7
|
||||
#define FPSCI_DISABLED -8
|
||||
#define FPSCI_INVALID_ADDRESS -9
|
||||
|
||||
int FPsciInit(void) ;
|
||||
int FPsciVersion(void) ;
|
||||
int FPsciCpuSuspend(u32 power_state, unsigned long entry_point_address, unsigned long context_id) ;
|
||||
int FPsciCpuOn(unsigned long target_cpu, unsigned long entry_point_address, unsigned long context_id) ;
|
||||
int FPsciAffinityInfo(unsigned long target_affinity, u32 lowest_affinity_level) ;
|
||||
void FPsciSystemReset(u32 reset_type) ;
|
||||
int FPsciFeatures(u32 psci_fid) ;
|
||||
int FPsciCpuOff(void) ;
|
||||
int FPsciCpuMaskOn(s32 cpu_id_mask, uintptr bootaddr) ;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_ARM_MACRO_H__ */
|
||||
|
||||
@@ -84,6 +84,7 @@ typedef unsigned long ULONG;
|
||||
#endif
|
||||
|
||||
#define _INLINE inline
|
||||
#define _ALWAYS_INLINE inline __attribute__((always_inline))
|
||||
#define _WEAK __attribute__((weak))
|
||||
|
||||
typedef void (*FIrqHandler)(void *InstancePtr);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
+73
-13
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user