diff --git a/bsp/phytium/README.md b/bsp/phytium/README.md index 3f94e6e3ba1..c92f4b3263a 100644 --- a/bsp/phytium/README.md +++ b/bsp/phytium/README.md @@ -43,6 +43,7 @@ | E2000Q | 支持 | 支持SMP | | E2000S | 支持 | | +- Phytium PI 上使用 RT-Thread 要注意读写操作不能影响 SD 卡的固件,具体使用方法可以[参考](./doc/use_phytium_pi_sd_image.md) ## 如何在Ubuntu/Windows 环境下使用此BSP diff --git a/bsp/phytium/aarch32/.config b/bsp/phytium/aarch32/.config index 8d2c0160cb9..c7d8ec77c9f 100644 --- a/bsp/phytium/aarch32/.config +++ b/bsp/phytium/aarch32/.config @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -186,15 +187,23 @@ CONFIG_RT_SERIAL_RB_BUFSZ=1024 # CONFIG_RT_USING_PIN is not set # CONFIG_RT_USING_ADC is not set # CONFIG_RT_USING_DAC is not set -# CONFIG_RT_USING_NULL is not set -# CONFIG_RT_USING_ZERO is not set -# CONFIG_RT_USING_RANDOM is not set +CONFIG_RT_USING_NULL=y +CONFIG_RT_USING_ZERO=y +CONFIG_RT_USING_RANDOM=y # CONFIG_RT_USING_PWM is not set # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_PM is not set -# CONFIG_RT_USING_RTC is not set -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_RTC=y +# CONFIG_RT_USING_ALARM is not set +# CONFIG_RT_USING_SOFT_RTC is not set +CONFIG_RT_USING_SDIO=y +CONFIG_RT_SDIO_STACK_SIZE=4096 +CONFIG_RT_SDIO_THREAD_PRIORITY=15 +CONFIG_RT_MMCSD_STACK_SIZE=4096 +CONFIG_RT_MMCSD_THREAD_PREORITY=22 +CONFIG_RT_MMCSD_MAX_PARTITION=16 +# CONFIG_RT_SDIO_DEBUG is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -851,6 +860,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1180,7 +1190,12 @@ CONFIG_RT_USING_UART1=y # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_PWM is not set # CONFIG_BSP_USING_I2C is not set -# CONFIG_BSP_USING_SDIF is not set +CONFIG_BSP_USING_SDIF=y +CONFIG_BSP_USING_SDCARD_FATFS=y +CONFIG_BSP_USING_SDCARD_PARTITION="sd1" +CONFIG_USING_SDIF0=y +# CONFIG_USING_SDIF1 is not set +# CONFIG_USING_EMMC is not set # # Board extended module Drivers @@ -1196,15 +1211,14 @@ CONFIG_USE_AARCH64_L1_TO_AARCH32=y # # Soc configuration # -# CONFIG_TARGET_PHYTIUMPI is not set +CONFIG_TARGET_PHYTIUMPI=y # CONFIG_TARGET_E2000Q is not set -CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000D is not set # CONFIG_TARGET_E2000S is not set # CONFIG_TARGET_FT2004 is not set # CONFIG_TARGET_D2000 is not set -CONFIG_SOC_NAME="e2000" -CONFIG_TARGET_TYPE_NAME="d" -CONFIG_SOC_CORE_NUM=2 +CONFIG_SOC_NAME="phytiumpi" +CONFIG_SOC_CORE_NUM=4 CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 @@ -1218,22 +1232,21 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y # # Board Configuration # -CONFIG_E2000D_DEMO_BOARD=y -CONFIG_BOARD_NAME="demo" - -# -# IO mux configuration when board start up -# +CONFIG_BOARD_NAME="firefly" # CONFIG_USE_SPI_IOPAD is not set # CONFIG_USE_GPIO_IOPAD is not set # CONFIG_USE_CAN_IOPAD is not set # CONFIG_USE_QSPI_IOPAD is not set # CONFIG_USE_PWM_IOPAD is not set -# CONFIG_USE_ADC_IOPAD is not set # CONFIG_USE_MIO_IOPAD is not set # CONFIG_USE_TACHO_IOPAD is not set # CONFIG_USE_UART_IOPAD is not set # CONFIG_USE_THIRD_PARTY_IOPAD is not set +CONFIG_FIREFLY_DEMO_BOARD=y + +# +# IO mux configuration when board start up +# # CONFIG_CUS_DEMO_BOARD is not set # diff --git a/bsp/phytium/aarch32/applications/main.c b/bsp/phytium/aarch32/applications/main.c index 5abc3130b02..624f92ca40a 100644 --- a/bsp/phytium/aarch32/applications/main.c +++ b/bsp/phytium/aarch32/applications/main.c @@ -16,6 +16,23 @@ #include +#define ASSERT_STATIC(expression) \ + extern int assert_static[(expression) ? 1 : -1] + +#define ASSERT_STATIC(expression) \ + extern int assert_static[(expression) ? 1 : -1] + +/* check if SMP related setting ok */ +#ifndef RT_USING_SMP +ASSERT_STATIC(RT_CPUS_NR == 1U); /* please set RT_CPUS_NR = 1 when SMP off */ +#else +#if defined(TARGET_E2000D) +ASSERT_STATIC(RT_CPUS_NR <= 2U); /* use 2 cores at most */ +#elif defined(TARGET_E2000Q) || defined(TARGET_PHYTIUMPI) +ASSERT_STATIC(RT_CPUS_NR <= 4U); /* use 4 cores at most */ +#endif +#endif + #ifdef RT_USING_SMP struct rt_thread test_core[RT_CPUS_NR]; diff --git a/bsp/phytium/aarch32/applications/mnt.c b/bsp/phytium/aarch32/applications/mnt.c index 7591b99fbf8..12c22cb2a3d 100644 --- a/bsp/phytium/aarch32/applications/mnt.c +++ b/bsp/phytium/aarch32/applications/mnt.c @@ -18,28 +18,8 @@ #include #include -#ifdef BSP_USING_SDCARD_FATFS -#define SD_DEIVCE_NAME "sd" -static int filesystem_mount(void) +static int ram_disk_mount(const char *mount_point) { - while (rt_device_find(SD_DEIVCE_NAME) == RT_NULL) - { - rt_thread_mdelay(1); - } - - if (dfs_mount(SD_DEIVCE_NAME, "/", "elm", 0, 0) == 0) - { - LOG_I("file system initialization done!\n"); - } - else - { - LOG_E("[sd] File System on SD initialization failed!"); - LOG_E("[sd] Please format SD Card as FAT32!!!..."); - 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); @@ -48,50 +28,107 @@ static int filesystem_mount(void) pool = rt_malloc(size); if (pool == RT_NULL) - { LOG_E("Malloc fail!"); + + if (dfs_mount(RT_NULL, mount_point, "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; +} + +#ifdef BSP_USING_SDCARD_FATFS +extern void fsdif_change(void); +static int sd_disk_try_mount(char *device_name, char *mount_point, char *fs_type_name, int mkfs_count) +{ + struct statfs fs_stat; + int rc = 0; + + LOG_I("mount(\"%s\",\"%s\",\"%s\");", device_name, mount_point, fs_type_name); + + if (rt_device_find(device_name) == NULL) + { + LOG_I("%s not find!!!", device_name); + return -RT_EIO; } - if (dfs_mount(RT_NULL, "/ram", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0) + mkdir(mount_point, 0); +_remount: + rc = dfs_mount(device_name, mount_point, fs_type_name, 0, 0); + if (rc == 0) { - LOG_I("RAM file system initializated!"); + LOG_I("mounted %s on %s", device_name, mount_point); + if (dfs_statfs(mount_point, &fs_stat) >= 0) + { + LOG_I("%s size:%d, total: %d, free: %d", mount_point, + fs_stat.f_bsize, fs_stat.f_blocks, fs_stat.f_bfree); + } } else { - LOG_E("RAM file system initializate failed!"); + if (mkfs_count > 0) + { + /* LOG_I("[%s]try mkfs -t %s %s ", mkfs_count, fs_type_name, device_name); + dfs_mkfs(fs_type_name, device_name); */ + mkfs_count--; + LOG_E("%s is not in %s, please format first !!!", device_name, fs_type_name); + goto _remount; + } + + LOG_I("mount failed :%d ", rc); + return -RT_EIO; } -#endif + return RT_EOK; } -INIT_ENV_EXPORT(filesystem_mount); -#else -static int filesystem_mount(void) +static void sd_filesytem_task_entry(void *parameter) { -#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; + int result; + LOG_D("sdio host change: %d", change); + mmcsd_wait_cd_changed(0); /* clear */ + fsdif_change(); /* send cd change to host */ - pool = rt_malloc(size); - if (pool == RT_NULL) + /* block until plug/unplug event happens */ + result = mmcsd_wait_cd_changed(RT_WAITING_FOREVER); + if (result == MMCSD_HOST_PLUGED) { - LOG_E("Malloc fail!"); + rt_kprintf("mmcsd change pluged \n"); + /* mount sdcard partition as / */ + if (RT_EOK == sd_disk_try_mount(BSP_USING_SDCARD_PARTITION, "/", "elm", 0)) + { + ram_disk_mount("/ram"); /* mount ramdisk if configured */ + } } +} - if (dfs_mount(RT_NULL, "/", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0) +int filesystem_mount(void) +{ + rt_thread_t tid; + tid = rt_thread_create("sd_filesytem", sd_filesytem_task_entry, + RT_NULL, + 4096, + RT_THREAD_PRIORITY_MAX - 2, 20); + if (tid != RT_NULL) { - LOG_I("RAM file system initializated!"); + rt_thread_startup(tid); } else { - LOG_E("RAM file system initializate failed!"); + LOG_E("create sd mount task error!"); } -#endif return RT_EOK; } -INIT_ENV_EXPORT(filesystem_mount); +INIT_APP_EXPORT(filesystem_mount); + +#else +static int filesystem_mount(void) +{ + return ram_disk_mount("/"); /* mount ramdisk as / */ +} +INIT_APP_EXPORT(filesystem_mount); #endif // #ifdef BSP_USING_SDCARD_FATFS #endif // #if defined(RT_USING_DFS) \ No newline at end of file diff --git a/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart b/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart index a3bdeb483a7..72a31f3985a 100644 --- a/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart +++ b/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMART=y # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=2 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -869,6 +870,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # diff --git a/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart.h b/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart.h index 4b79895e2e6..0b4fb3adaf9 100644 --- a/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart.h +++ b/bsp/phytium/aarch32/configs/e2000d_demo_rtsmart.h @@ -8,7 +8,8 @@ #define RT_NAME_MAX 16 #define RT_USING_SMART -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 2 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -19,6 +20,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 diff --git a/bsp/phytium/aarch32/configs/e2000d_demo_rtthread b/bsp/phytium/aarch32/configs/e2000d_demo_rtthread index 8d2c0160cb9..5660ee73ebe 100644 --- a/bsp/phytium/aarch32/configs/e2000d_demo_rtthread +++ b/bsp/phytium/aarch32/configs/e2000d_demo_rtthread @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=2 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -851,6 +852,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # diff --git a/bsp/phytium/aarch32/configs/e2000d_demo_rtthread.h b/bsp/phytium/aarch32/configs/e2000d_demo_rtthread.h index 8a0df38d995..ebf4c745aed 100644 --- a/bsp/phytium/aarch32/configs/e2000d_demo_rtthread.h +++ b/bsp/phytium/aarch32/configs/e2000d_demo_rtthread.h @@ -7,7 +7,8 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 16 -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 2 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -18,6 +19,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 diff --git a/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart b/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart index 0e9453f1ba0..97c9cc73f7f 100644 --- a/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart +++ b/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMART=y # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=2 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -869,6 +870,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1236,7 +1238,6 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y # # Board Configuration # -# CONFIG_E2000D_DEMO_BOARD is not set CONFIG_BOARD_NAME="demo" # CONFIG_USE_SPI_IOPAD is not set # CONFIG_USE_GPIO_IOPAD is not set diff --git a/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart.h b/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart.h index 5f1eabd84da..1d678446b3a 100644 --- a/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart.h +++ b/bsp/phytium/aarch32/configs/e2000q_demo_rtsmart.h @@ -8,7 +8,8 @@ #define RT_NAME_MAX 16 #define RT_USING_SMART -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 2 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -19,6 +20,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 diff --git a/bsp/phytium/aarch32/configs/e2000q_demo_rtthread b/bsp/phytium/aarch32/configs/e2000q_demo_rtthread index 1be8b0334f0..5d745f167f9 100644 --- a/bsp/phytium/aarch32/configs/e2000q_demo_rtthread +++ b/bsp/phytium/aarch32/configs/e2000q_demo_rtthread @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=2 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -853,6 +854,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # diff --git a/bsp/phytium/aarch32/configs/e2000q_demo_rtthread.h b/bsp/phytium/aarch32/configs/e2000q_demo_rtthread.h index dd032a72b86..0751ddcbc3f 100644 --- a/bsp/phytium/aarch32/configs/e2000q_demo_rtthread.h +++ b/bsp/phytium/aarch32/configs/e2000q_demo_rtthread.h @@ -7,7 +7,8 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 16 -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 2 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -18,6 +19,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 diff --git a/bsp/phytium/aarch32/configs/phytium_pi_rtsmart b/bsp/phytium/aarch32/configs/phytium_pi_rtsmart index cf3ccc53f22..e8b922496ae 100644 --- a/bsp/phytium/aarch32/configs/phytium_pi_rtsmart +++ b/bsp/phytium/aarch32/configs/phytium_pi_rtsmart @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMART=y # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -210,7 +211,13 @@ CONFIG_RT_USING_RANDOM=y CONFIG_RT_USING_RTC=y # CONFIG_RT_USING_ALARM is not set # CONFIG_RT_USING_SOFT_RTC is not set -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_SDIO=y +CONFIG_RT_SDIO_STACK_SIZE=4096 +CONFIG_RT_SDIO_THREAD_PRIORITY=15 +CONFIG_RT_MMCSD_STACK_SIZE=4096 +CONFIG_RT_MMCSD_THREAD_PREORITY=22 +CONFIG_RT_MMCSD_MAX_PARTITION=16 +# CONFIG_RT_SDIO_DEBUG is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -869,6 +876,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1198,7 +1206,12 @@ CONFIG_RT_USING_UART1=y # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_PWM is not set # CONFIG_BSP_USING_I2C is not set -# CONFIG_BSP_USING_SDIF is not set +CONFIG_BSP_USING_SDIF=y +CONFIG_BSP_USING_SDCARD_FATFS=y +CONFIG_BSP_USING_SDCARD_PARTITION="sd1" +CONFIG_USING_SDIF0=y +# CONFIG_USING_SDIF1 is not set +# CONFIG_USING_EMMC is not set # # Board extended module Drivers diff --git a/bsp/phytium/aarch32/configs/phytium_pi_rtsmart.h b/bsp/phytium/aarch32/configs/phytium_pi_rtsmart.h index db2aa09d318..4267111672b 100644 --- a/bsp/phytium/aarch32/configs/phytium_pi_rtsmart.h +++ b/bsp/phytium/aarch32/configs/phytium_pi_rtsmart.h @@ -8,7 +8,8 @@ #define RT_NAME_MAX 16 #define RT_USING_SMART -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 4 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -19,6 +20,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 @@ -139,6 +141,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 #define RT_USING_DEV_BUS #define RT_USING_KTIME @@ -379,6 +387,10 @@ #define BSP_USING_IOPAD #define BSP_USING_UART #define RT_USING_UART1 +#define BSP_USING_SDIF +#define BSP_USING_SDCARD_FATFS +#define BSP_USING_SDCARD_PARTITION "sd1" +#define USING_SDIF0 /* Board extended module Drivers */ diff --git a/bsp/phytium/aarch32/configs/phytium_pi_rtthread b/bsp/phytium/aarch32/configs/phytium_pi_rtthread index e25fbd59acf..c7d8ec77c9f 100644 --- a/bsp/phytium/aarch32/configs/phytium_pi_rtthread +++ b/bsp/phytium/aarch32/configs/phytium_pi_rtthread @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=4096 +CONFIG_SYSTEM_THREAD_STACK_SIZE=4096 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 @@ -196,7 +197,13 @@ CONFIG_RT_USING_RANDOM=y CONFIG_RT_USING_RTC=y # CONFIG_RT_USING_ALARM is not set # CONFIG_RT_USING_SOFT_RTC is not set -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_SDIO=y +CONFIG_RT_SDIO_STACK_SIZE=4096 +CONFIG_RT_SDIO_THREAD_PRIORITY=15 +CONFIG_RT_MMCSD_STACK_SIZE=4096 +CONFIG_RT_MMCSD_THREAD_PREORITY=22 +CONFIG_RT_MMCSD_MAX_PARTITION=16 +# CONFIG_RT_SDIO_DEBUG is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -853,6 +860,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1182,7 +1190,12 @@ CONFIG_RT_USING_UART1=y # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_PWM is not set # CONFIG_BSP_USING_I2C is not set -# CONFIG_BSP_USING_SDIF is not set +CONFIG_BSP_USING_SDIF=y +CONFIG_BSP_USING_SDCARD_FATFS=y +CONFIG_BSP_USING_SDCARD_PARTITION="sd1" +CONFIG_USING_SDIF0=y +# CONFIG_USING_SDIF1 is not set +# CONFIG_USING_EMMC is not set # # Board extended module Drivers @@ -1229,7 +1242,6 @@ CONFIG_BOARD_NAME="firefly" # CONFIG_USE_TACHO_IOPAD is not set # CONFIG_USE_UART_IOPAD is not set # CONFIG_USE_THIRD_PARTY_IOPAD is not set -# CONFIG_E2000Q_DEMO_BOARD is not set CONFIG_FIREFLY_DEMO_BOARD=y # diff --git a/bsp/phytium/aarch32/configs/phytium_pi_rtthread.h b/bsp/phytium/aarch32/configs/phytium_pi_rtthread.h index c5cc3a480e5..e38d0cac175 100644 --- a/bsp/phytium/aarch32/configs/phytium_pi_rtthread.h +++ b/bsp/phytium/aarch32/configs/phytium_pi_rtthread.h @@ -7,7 +7,8 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 16 -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 4 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -18,6 +19,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 @@ -128,6 +130,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 #define RT_USING_DEV_BUS #define RT_USING_KTIME @@ -368,6 +376,10 @@ #define BSP_USING_IOPAD #define BSP_USING_UART #define RT_USING_UART1 +#define BSP_USING_SDIF +#define BSP_USING_SDCARD_FATFS +#define BSP_USING_SDCARD_PARTITION "sd1" +#define USING_SDIF0 /* Board extended module Drivers */ diff --git a/bsp/phytium/aarch32/rtconfig.h b/bsp/phytium/aarch32/rtconfig.h index 8a0df38d995..e38d0cac175 100644 --- a/bsp/phytium/aarch32/rtconfig.h +++ b/bsp/phytium/aarch32/rtconfig.h @@ -7,7 +7,8 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 16 -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 4 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -18,6 +19,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 4096 +#define SYSTEM_THREAD_STACK_SIZE 4096 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 4096 @@ -124,6 +126,16 @@ #define RT_USING_SERIAL_V1 #define RT_SERIAL_USING_DMA #define RT_SERIAL_RB_BUFSZ 1024 +#define RT_USING_NULL +#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 #define RT_USING_KTIME @@ -364,6 +376,10 @@ #define BSP_USING_IOPAD #define BSP_USING_UART #define RT_USING_UART1 +#define BSP_USING_SDIF +#define BSP_USING_SDCARD_FATFS +#define BSP_USING_SDCARD_PARTITION "sd1" +#define USING_SDIF0 /* Board extended module Drivers */ @@ -376,10 +392,9 @@ /* Soc configuration */ -#define TARGET_E2000D -#define SOC_NAME "e2000" -#define TARGET_TYPE_NAME "d" -#define SOC_CORE_NUM 2 +#define TARGET_PHYTIUMPI +#define SOC_NAME "phytiumpi" +#define SOC_CORE_NUM 4 #define F32BIT_MEMORY_ADDRESS 0x80000000 #define F32BIT_MEMORY_LENGTH 0x80000000 #define F64BIT_MEMORY_ADDRESS 0x2000000000 @@ -389,8 +404,8 @@ /* Board Configuration */ -#define E2000D_DEMO_BOARD -#define BOARD_NAME "demo" +#define BOARD_NAME "firefly" +#define FIREFLY_DEMO_BOARD /* IO mux configuration when board start up */ diff --git a/bsp/phytium/aarch64/.config b/bsp/phytium/aarch64/.config index 0f550e7375c..c65e8998d28 100644 --- a/bsp/phytium/aarch64/.config +++ b/bsp/phytium/aarch64/.config @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -190,15 +190,23 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64 # CONFIG_RT_USING_PIN is not set # CONFIG_RT_USING_ADC is not set # CONFIG_RT_USING_DAC is not set -# CONFIG_RT_USING_NULL is not set -# CONFIG_RT_USING_ZERO is not set -# CONFIG_RT_USING_RANDOM is not set +CONFIG_RT_USING_NULL=y +CONFIG_RT_USING_ZERO=y +CONFIG_RT_USING_RANDOM=y # CONFIG_RT_USING_PWM is not set # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_PM is not set -# CONFIG_RT_USING_RTC is not set -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_RTC=y +# CONFIG_RT_USING_ALARM is not set +# CONFIG_RT_USING_SOFT_RTC is not set +CONFIG_RT_USING_SDIO=y +CONFIG_RT_SDIO_STACK_SIZE=8192 +CONFIG_RT_SDIO_THREAD_PRIORITY=15 +CONFIG_RT_MMCSD_STACK_SIZE=8192 +CONFIG_RT_MMCSD_THREAD_PREORITY=22 +CONFIG_RT_MMCSD_MAX_PARTITION=16 +# CONFIG_RT_SDIO_DEBUG is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -331,7 +339,7 @@ CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=16184 # CONFIG_LWIP_NO_RX_THREAD is not set # CONFIG_LWIP_NO_TX_THREAD is not set CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12 -CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=2048 +CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=8192 CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8 # CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 @@ -879,6 +887,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1232,7 +1241,12 @@ CONFIG_RT_USING_UART1=y # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_PWM is not set # CONFIG_BSP_USING_I2C is not set -# CONFIG_BSP_USING_SDIF is not set +CONFIG_BSP_USING_SDIF=y +CONFIG_BSP_USING_SDCARD_FATFS=y +CONFIG_BSP_USING_SDCARD_PARTITION="sd1" +CONFIG_USING_SDIF0=y +# CONFIG_USING_SDIF1 is not set +# CONFIG_USING_EMMC is not set # # Board extended module Drivers @@ -1240,7 +1254,7 @@ CONFIG_RT_USING_UART1=y CONFIG_BSP_USING_GIC=y CONFIG_BSP_USING_GICV3=y CONFIG_PHYTIUM_ARCH_AARCH64=y -CONFIG_ARM_SPI_BIND_CPU_ID=0 +CONFIG_ARM_SPI_BIND_CPU_ID=2 # # Standalone Setting @@ -1250,15 +1264,14 @@ CONFIG_TARGET_ARMV8_AARCH64=y # # Soc configuration # -# CONFIG_TARGET_PHYTIUMPI is not set +CONFIG_TARGET_PHYTIUMPI=y # CONFIG_TARGET_E2000Q is not set -CONFIG_TARGET_E2000D=y +# CONFIG_TARGET_E2000D is not set # CONFIG_TARGET_E2000S is not set # CONFIG_TARGET_FT2004 is not set # CONFIG_TARGET_D2000 is not set -CONFIG_SOC_NAME="e2000" -CONFIG_TARGET_TYPE_NAME="d" -CONFIG_SOC_CORE_NUM=2 +CONFIG_SOC_NAME="phytiumpi" +CONFIG_SOC_CORE_NUM=4 CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000 CONFIG_F32BIT_MEMORY_LENGTH=0x80000000 CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000 @@ -1272,32 +1285,32 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y # # Board Configuration # -CONFIG_E2000D_DEMO_BOARD=y -CONFIG_BOARD_NAME="demo" - -# -# IO mux configuration when board start up -# +CONFIG_BOARD_NAME="firefly" # CONFIG_USE_SPI_IOPAD is not set # CONFIG_USE_GPIO_IOPAD is not set # CONFIG_USE_CAN_IOPAD is not set # CONFIG_USE_QSPI_IOPAD is not set # CONFIG_USE_PWM_IOPAD is not set -# CONFIG_USE_ADC_IOPAD is not set # CONFIG_USE_MIO_IOPAD is not set # CONFIG_USE_TACHO_IOPAD is not set # CONFIG_USE_UART_IOPAD is not set # CONFIG_USE_THIRD_PARTY_IOPAD is not set +# CONFIG_E2000Q_DEMO_BOARD is not set +CONFIG_FIREFLY_DEMO_BOARD=y + +# +# IO mux configuration when board start up +# # CONFIG_CUS_DEMO_BOARD is not set # # Sdk common configuration # # CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set +CONFIG_LOG_DEBUG=y # CONFIG_LOG_INFO is not set # CONFIG_LOG_WARN is not set -CONFIG_LOG_ERROR=y +# CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set # CONFIG_LOG_EXTRA_INFO is not set # CONFIG_LOG_DISPALY_CORE_NUM is not set diff --git a/bsp/phytium/aarch64/.configs b/bsp/phytium/aarch64/.configs deleted file mode 100644 index c1497e82e5c..00000000000 --- a/bsp/phytium/aarch64/.configs +++ /dev/null @@ -1,1116 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# RT-Thread Project Configuration -# - -# -# RT-Thread Kernel -# -CONFIG_RT_NAME_MAX=16 -# CONFIG_RT_USING_ARCH_DATA_TYPE is not set -# CONFIG_RT_USING_SMART is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_ALIGN_SIZE=4 -# CONFIG_RT_THREAD_PRIORITY_8 is not set -CONFIG_RT_THREAD_PRIORITY_32=y -# CONFIG_RT_THREAD_PRIORITY_256 is not set -CONFIG_RT_THREAD_PRIORITY_MAX=32 -CONFIG_RT_TICK_PER_SECOND=1000 -CONFIG_RT_USING_OVERFLOW_CHECK=y -CONFIG_RT_USING_HOOK=y -CONFIG_RT_HOOK_USING_FUNC_PTR=y -CONFIG_RT_USING_IDLE_HOOK=y -CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 -CONFIG_IDLE_THREAD_STACK_SIZE=40960 -CONFIG_RT_USING_TIMER_SOFT=y -CONFIG_RT_TIMER_THREAD_PRIO=4 -CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096 - -# -# kservice optimization -# -CONFIG_RT_KSERVICE_USING_STDLIB=y -# CONFIG_RT_KSERVICE_USING_STDLIB_MEMORY is not set -# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set -# CONFIG_RT_USING_TINY_FFS is not set -CONFIG_RT_KPRINTF_USING_LONGLONG=y -CONFIG_RT_DEBUG=y -# CONFIG_RT_DEBUG_COLOR is not set -# CONFIG_RT_DEBUG_INIT_CONFIG is not set -# CONFIG_RT_DEBUG_THREAD_CONFIG is not set -# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set -# CONFIG_RT_DEBUG_IPC_CONFIG is not set -# CONFIG_RT_DEBUG_TIMER_CONFIG is not set -# CONFIG_RT_DEBUG_IRQ_CONFIG is not set -# CONFIG_RT_DEBUG_MEM_CONFIG is not set -# CONFIG_RT_DEBUG_SLAB_CONFIG is not set -# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set -# CONFIG_RT_DEBUG_MODULE_CONFIG is not set - -# -# Inter-Thread communication -# -CONFIG_RT_USING_SEMAPHORE=y -CONFIG_RT_USING_MUTEX=y -CONFIG_RT_USING_EVENT=y -CONFIG_RT_USING_MAILBOX=y -CONFIG_RT_USING_MESSAGEQUEUE=y -# CONFIG_RT_USING_SIGNALS is not set - -# -# Memory Management -# -CONFIG_RT_PAGE_MAX_ORDER=11 -CONFIG_RT_USING_MEMPOOL=y -CONFIG_RT_USING_SMALL_MEM=y -# CONFIG_RT_USING_SLAB is not set -CONFIG_RT_USING_MEMHEAP=y -CONFIG_RT_MEMHEAP_FAST_MODE=y -# CONFIG_RT_MEMHEAP_BEST_MODE is not set -CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y -# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set -# CONFIG_RT_USING_SLAB_AS_HEAP is not set -# CONFIG_RT_USING_USERHEAP is not set -# CONFIG_RT_USING_NOHEAP is not set -# CONFIG_RT_USING_MEMTRACE is not set -# CONFIG_RT_USING_HEAP_ISR is not set -CONFIG_RT_USING_HEAP=y - -# -# Kernel Device Object -# -CONFIG_RT_USING_DEVICE=y -# CONFIG_RT_USING_DEVICE_OPS is not set -# CONFIG_RT_USING_DM is not set -# CONFIG_RT_USING_INTERRUPT_INFO is not set -CONFIG_RT_USING_CONSOLE=y -CONFIG_RT_CONSOLEBUF_SIZE=128 -CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" -CONFIG_RT_VER_NUM=0x50001 -# CONFIG_RT_USING_STDC_ATOMIC is not set -CONFIG_ARCH_CPU_64BIT=y -CONFIG_RT_USING_CACHE=y -CONFIG_RT_USING_HW_ATOMIC=y -CONFIG_ARCH_ARM_BOOTWITH_FLUSH_CACHE=y -# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set -# CONFIG_RT_USING_CPU_FFS is not set -CONFIG_ARCH_MM_MMU=y -CONFIG_ARCH_ARM=y -CONFIG_ARCH_ARM_MMU=y -CONFIG_ARCH_ARMV8=y - -# -# RT-Thread Components -# -CONFIG_RT_USING_COMPONENTS_INIT=y -CONFIG_RT_USING_USER_MAIN=y -CONFIG_RT_MAIN_THREAD_STACK_SIZE=8192 -CONFIG_RT_MAIN_THREAD_PRIORITY=10 -# CONFIG_RT_USING_LEGACY is not set -CONFIG_RT_USING_MSH=y -CONFIG_RT_USING_FINSH=y -CONFIG_FINSH_USING_MSH=y -CONFIG_FINSH_THREAD_NAME="tshell" -CONFIG_FINSH_THREAD_PRIORITY=20 -CONFIG_FINSH_THREAD_STACK_SIZE=4096 -CONFIG_FINSH_USING_HISTORY=y -CONFIG_FINSH_HISTORY_LINES=5 -CONFIG_FINSH_USING_SYMTAB=y -CONFIG_FINSH_CMD_SIZE=80 -CONFIG_MSH_USING_BUILT_IN_COMMANDS=y -CONFIG_FINSH_USING_DESCRIPTION=y -# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set -# CONFIG_FINSH_USING_AUTH is not set -CONFIG_FINSH_ARG_MAX=10 - -# -# DFS: device virtual file system -# -CONFIG_RT_USING_DFS=y -CONFIG_DFS_USING_POSIX=y -CONFIG_DFS_USING_WORKDIR=y -# CONFIG_RT_USING_DFS_MNTTABLE is not set -CONFIG_DFS_FD_MAX=16 -CONFIG_RT_USING_DFS_V1=y -# CONFIG_RT_USING_DFS_V2 is not set -CONFIG_DFS_FILESYSTEMS_MAX=4 -CONFIG_DFS_FILESYSTEM_TYPES_MAX=4 -# CONFIG_RT_USING_DFS_ELMFAT is not set -CONFIG_RT_USING_DFS_DEVFS=y -# CONFIG_RT_USING_DFS_ROMFS is not set -# CONFIG_RT_USING_DFS_CROMFS is not set -CONFIG_RT_USING_DFS_RAMFS=y -# CONFIG_RT_USING_DFS_TMPFS is not set -# CONFIG_RT_USING_FAL is not set - -# -# Device Drivers -# -CONFIG_RT_USING_DEVICE_IPC=y -CONFIG_RT_UNAMED_PIPE_NUMBER=64 -CONFIG_RT_USING_SYSTEM_WORKQUEUE=y -CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=8192 -CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 -CONFIG_RT_USING_SERIAL=y -CONFIG_RT_USING_SERIAL_V1=y -# CONFIG_RT_USING_SERIAL_V2 is not set -CONFIG_RT_SERIAL_USING_DMA=y -CONFIG_RT_SERIAL_RB_BUFSZ=64 -# CONFIG_RT_USING_CAN is not set -# CONFIG_RT_USING_HWTIMER is not set -# CONFIG_RT_USING_CPUTIME is not set -# CONFIG_RT_USING_I2C is not set -# CONFIG_RT_USING_PHY is not set -# CONFIG_RT_USING_PIN is not set -# CONFIG_RT_USING_ADC is not set -# CONFIG_RT_USING_DAC is not set -CONFIG_RT_USING_NULL=y -CONFIG_RT_USING_ZERO=y -CONFIG_RT_USING_RANDOM=y -# CONFIG_RT_USING_PWM is not set -# CONFIG_RT_USING_MTD_NOR is not set -# CONFIG_RT_USING_MTD_NAND is not set -# CONFIG_RT_USING_PM is not set -# CONFIG_RT_USING_FDT is not set -CONFIG_RT_USING_RTC=y -# CONFIG_RT_USING_ALARM is not set -# CONFIG_RT_USING_SOFT_RTC is not set -# CONFIG_RT_USING_SDIO is not set -# CONFIG_RT_USING_SPI is not set -# CONFIG_RT_USING_WDT is not set -# CONFIG_RT_USING_AUDIO is not set -# CONFIG_RT_USING_SENSOR is not set -# CONFIG_RT_USING_TOUCH is not set -# CONFIG_RT_USING_LCD is not set -# CONFIG_RT_USING_HWCRYPTO is not set -# CONFIG_RT_USING_PULSE_ENCODER is not set -# CONFIG_RT_USING_INPUT_CAPTURE is not set -# CONFIG_RT_USING_DEV_BUS is not set -# CONFIG_RT_USING_WIFI is not set -# CONFIG_RT_USING_VIRTIO is not set - -# -# Using USB -# -# CONFIG_RT_USING_USB is not set -# CONFIG_RT_USING_USB_HOST is not set -# CONFIG_RT_USING_USB_DEVICE is not set - -# -# C/C++ and POSIX layer -# -CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 - -# -# POSIX (Portable Operating System Interface) layer -# -CONFIG_RT_USING_POSIX_FS=y -CONFIG_RT_USING_POSIX_DEVIO=y -CONFIG_RT_USING_POSIX_STDIO=y -# CONFIG_RT_USING_POSIX_POLL is not set -# CONFIG_RT_USING_POSIX_SELECT is not set -# CONFIG_RT_USING_POSIX_SOCKET is not set -CONFIG_RT_USING_POSIX_TERMIOS=y -# CONFIG_RT_USING_POSIX_AIO is not set -# CONFIG_RT_USING_POSIX_MMAN is not set -CONFIG_RT_USING_POSIX_DELAY=y -CONFIG_RT_USING_POSIX_CLOCK=y -CONFIG_RT_USING_POSIX_TIMER=y -# CONFIG_RT_USING_PTHREADS is not set -# CONFIG_RT_USING_MODULE is not set - -# -# Interprocess Communication (IPC) -# -# CONFIG_RT_USING_POSIX_PIPE is not set -# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set -# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set - -# -# Socket is in the 'Network' category -# -# CONFIG_RT_USING_CPLUSPLUS is not set - -# -# Network -# -# CONFIG_RT_USING_SAL is not set -# CONFIG_RT_USING_NETDEV is not set -# CONFIG_RT_USING_LWIP is not set -# CONFIG_RT_USING_AT is not set - -# -# Utilities -# -CONFIG_RT_USING_RYM=y -# CONFIG_YMODEM_USING_CRC_TABLE is not set -CONFIG_YMODEM_USING_FILE_TRANSFER=y -# CONFIG_RT_USING_ULOG is not set -# CONFIG_RT_USING_UTEST is not set -# CONFIG_RT_USING_VAR_EXPORT is not set -CONFIG_RT_USING_ADT=y -# CONFIG_RT_USING_RT_LINK is not set -# CONFIG_RT_USING_VBUS is not set - -# -# RT-Thread Utestcases -# -# CONFIG_RT_USING_UTESTCASES is not set - -# -# RT-Thread online packages -# - -# -# IoT - internet of things -# -# CONFIG_PKG_USING_LWIP is not set -# CONFIG_PKG_USING_LORAWAN_DRIVER is not set -# CONFIG_PKG_USING_PAHOMQTT is not set -# CONFIG_PKG_USING_UMQTT is not set -# CONFIG_PKG_USING_WEBCLIENT is not set -# CONFIG_PKG_USING_WEBNET is not set -# CONFIG_PKG_USING_MONGOOSE is not set -# CONFIG_PKG_USING_MYMQTT is not set -# CONFIG_PKG_USING_KAWAII_MQTT is not set -# CONFIG_PKG_USING_BC28_MQTT is not set -# CONFIG_PKG_USING_WEBTERMINAL is not set -# CONFIG_PKG_USING_LIBMODBUS is not set -# CONFIG_PKG_USING_FREEMODBUS is not set -# CONFIG_PKG_USING_NANOPB is not set - -# -# Wi-Fi -# - -# -# Marvell WiFi -# -# CONFIG_PKG_USING_WLANMARVELL is not set - -# -# Wiced WiFi -# -# CONFIG_PKG_USING_WLAN_WICED is not set -# CONFIG_PKG_USING_RW007 is not set -# CONFIG_PKG_USING_COAP is not set -# CONFIG_PKG_USING_NOPOLL is not set -# CONFIG_PKG_USING_NETUTILS is not set -# CONFIG_PKG_USING_CMUX is not set -# CONFIG_PKG_USING_PPP_DEVICE is not set -# CONFIG_PKG_USING_AT_DEVICE is not set -# CONFIG_PKG_USING_ATSRV_SOCKET is not set -# CONFIG_PKG_USING_WIZNET is not set -# CONFIG_PKG_USING_ZB_COORDINATOR is not set - -# -# IoT Cloud -# -# CONFIG_PKG_USING_ONENET is not set -# CONFIG_PKG_USING_GAGENT_CLOUD is not set -# CONFIG_PKG_USING_ALI_IOTKIT is not set -# CONFIG_PKG_USING_AZURE is not set -# CONFIG_PKG_USING_TENCENT_IOT_EXPLORER is not set -# CONFIG_PKG_USING_JIOT-C-SDK is not set -# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set -# CONFIG_PKG_USING_JOYLINK is not set -# CONFIG_PKG_USING_EZ_IOT_OS is not set -# CONFIG_PKG_USING_IOTSHARP_SDK is not set -# CONFIG_PKG_USING_NIMBLE is not set -# CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set -# CONFIG_PKG_USING_OTA_DOWNLOADER is not set -# CONFIG_PKG_USING_IPMSG is not set -# CONFIG_PKG_USING_LSSDP is not set -# CONFIG_PKG_USING_AIRKISS_OPEN is not set -# CONFIG_PKG_USING_LIBRWS is not set -# CONFIG_PKG_USING_TCPSERVER is not set -# CONFIG_PKG_USING_PROTOBUF_C is not set -# CONFIG_PKG_USING_DLT645 is not set -# CONFIG_PKG_USING_QXWZ is not set -# CONFIG_PKG_USING_SMTP_CLIENT is not set -# CONFIG_PKG_USING_ABUP_FOTA is not set -# CONFIG_PKG_USING_LIBCURL2RTT is not set -# CONFIG_PKG_USING_CAPNP is not set -# CONFIG_PKG_USING_AGILE_TELNET is not set -# CONFIG_PKG_USING_NMEALIB is not set -# CONFIG_PKG_USING_PDULIB is not set -# CONFIG_PKG_USING_BTSTACK is not set -# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set -# CONFIG_PKG_USING_WAYZ_IOTKIT is not set -# CONFIG_PKG_USING_MAVLINK is not set -# CONFIG_PKG_USING_BSAL is not set -# CONFIG_PKG_USING_AGILE_MODBUS is not set -# CONFIG_PKG_USING_AGILE_FTP is not set -# CONFIG_PKG_USING_EMBEDDEDPROTO is not set -# CONFIG_PKG_USING_RT_LINK_HW is not set -# CONFIG_PKG_USING_RYANMQTT is not set -# CONFIG_PKG_USING_RYANW5500 is not set -# CONFIG_PKG_USING_LORA_PKT_FWD is not set -# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set -# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set -# CONFIG_PKG_USING_HM is not set -# CONFIG_PKG_USING_SMALL_MODBUS is not set -# CONFIG_PKG_USING_NET_SERVER is not set -# CONFIG_PKG_USING_ZFTP is not set -# CONFIG_PKG_USING_WOL is not set -# CONFIG_PKG_USING_ZEPHYR_POLLING is not set - -# -# security packages -# -# CONFIG_PKG_USING_MBEDTLS is not set -# CONFIG_PKG_USING_LIBSODIUM is not set -# CONFIG_PKG_USING_LIBHYDROGEN is not set -# CONFIG_PKG_USING_TINYCRYPT is not set -# CONFIG_PKG_USING_TFM is not set -# CONFIG_PKG_USING_YD_CRYPTO is not set - -# -# language packages -# - -# -# JSON: JavaScript Object Notation, a lightweight data-interchange format -# -# CONFIG_PKG_USING_CJSON is not set -# CONFIG_PKG_USING_LJSON is not set -# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set -# CONFIG_PKG_USING_RAPIDJSON is not set -# CONFIG_PKG_USING_JSMN is not set -# CONFIG_PKG_USING_AGILE_JSMN is not set -# CONFIG_PKG_USING_PARSON is not set - -# -# XML: Extensible Markup Language -# -# CONFIG_PKG_USING_SIMPLE_XML is not set -# CONFIG_PKG_USING_EZXML is not set -# CONFIG_PKG_USING_LUATOS_SOC is not set -# CONFIG_PKG_USING_LUA is not set -# CONFIG_PKG_USING_JERRYSCRIPT is not set -# CONFIG_PKG_USING_MICROPYTHON is not set -# CONFIG_PKG_USING_PIKASCRIPT is not set -# CONFIG_PKG_USING_RTT_RUST is not set - -# -# multimedia packages -# - -# -# LVGL: powerful and easy-to-use embedded GUI library -# -# CONFIG_PKG_USING_LVGL is not set -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set -# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set -# CONFIG_PKG_USING_GUI_GUIDER_DEMO is not set - -# -# u8g2: a monochrome graphic library -# -# CONFIG_PKG_USING_U8G2_OFFICIAL is not set -# CONFIG_PKG_USING_U8G2 is not set -# CONFIG_PKG_USING_OPENMV is not set -# CONFIG_PKG_USING_MUPDF is not set -# CONFIG_PKG_USING_STEMWIN is not set -# CONFIG_PKG_USING_WAVPLAYER is not set -# CONFIG_PKG_USING_TJPGD is not set -# CONFIG_PKG_USING_PDFGEN is not set -# CONFIG_PKG_USING_HELIX is not set -# CONFIG_PKG_USING_AZUREGUIX is not set -# CONFIG_PKG_USING_TOUCHGFX2RTT is not set -# CONFIG_PKG_USING_NUEMWIN is not set -# CONFIG_PKG_USING_MP3PLAYER is not set -# CONFIG_PKG_USING_TINYJPEG is not set -# CONFIG_PKG_USING_UGUI is not set -# CONFIG_PKG_USING_MCURSES is not set -# CONFIG_PKG_USING_TERMBOX is not set -# CONFIG_PKG_USING_VT100 is not set -# CONFIG_PKG_USING_QRCODE is not set -# CONFIG_PKG_USING_GUIENGINE is not set -# CONFIG_PKG_USING_3GPP_AMRNB is not set - -# -# tools packages -# -# CONFIG_PKG_USING_CMBACKTRACE is not set -# CONFIG_PKG_USING_EASYFLASH is not set -# CONFIG_PKG_USING_EASYLOGGER is not set -# CONFIG_PKG_USING_SYSTEMVIEW is not set -# CONFIG_PKG_USING_SEGGER_RTT is not set -# CONFIG_PKG_USING_RTT_AUTO_EXE_CMD is not set -# CONFIG_PKG_USING_RDB is not set -# CONFIG_PKG_USING_ULOG_EASYFLASH is not set -# CONFIG_PKG_USING_LOGMGR is not set -# CONFIG_PKG_USING_ADBD is not set -# CONFIG_PKG_USING_COREMARK is not set -# CONFIG_PKG_USING_DHRYSTONE is not set -# CONFIG_PKG_USING_MEMORYPERF is not set -# CONFIG_PKG_USING_NR_MICRO_SHELL is not set -# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set -# CONFIG_PKG_USING_LUNAR_CALENDAR is not set -# CONFIG_PKG_USING_BS8116A is not set -# CONFIG_PKG_USING_GPS_RMC is not set -# CONFIG_PKG_USING_URLENCODE is not set -# CONFIG_PKG_USING_UMCN is not set -# CONFIG_PKG_USING_LWRB2RTT is not set -# CONFIG_PKG_USING_CPU_USAGE is not set -# CONFIG_PKG_USING_GBK2UTF8 is not set -# CONFIG_PKG_USING_VCONSOLE is not set -# CONFIG_PKG_USING_KDB is not set -# CONFIG_PKG_USING_WAMR is not set -# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set -# CONFIG_PKG_USING_LWLOG is not set -# CONFIG_PKG_USING_ANV_TRACE is not set -# CONFIG_PKG_USING_ANV_MEMLEAK is not set -# CONFIG_PKG_USING_ANV_TESTSUIT is not set -# CONFIG_PKG_USING_ANV_BENCH is not set -# CONFIG_PKG_USING_DEVMEM is not set -# CONFIG_PKG_USING_REGEX is not set -# CONFIG_PKG_USING_MEM_SANDBOX is not set -# CONFIG_PKG_USING_SOLAR_TERMS is not set -# CONFIG_PKG_USING_GAN_ZHI is not set -# CONFIG_PKG_USING_FDT is not set -# CONFIG_PKG_USING_CBOX is not set -# CONFIG_PKG_USING_SNOWFLAKE is not set -# CONFIG_PKG_USING_HASH_MATCH is not set -# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set -# CONFIG_PKG_USING_VOFA_PLUS is not set - -# -# system packages -# - -# -# enhanced kernel services -# -# CONFIG_PKG_USING_RT_MEMCPY_CM is not set -# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set -# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set - -# -# acceleration: Assembly language or algorithmic acceleration packages -# -# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set -# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set -# CONFIG_PKG_USING_QFPLIB_M3 is not set - -# -# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard -# -# CONFIG_PKG_USING_CMSIS_5 is not set -# CONFIG_PKG_USING_CMSIS_RTOS1 is not set -# CONFIG_PKG_USING_CMSIS_RTOS2 is not set - -# -# Micrium: Micrium software products porting for RT-Thread -# -# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set -# CONFIG_PKG_USING_UCOSII_WRAPPER is not set -# CONFIG_PKG_USING_UC_CRC is not set -# CONFIG_PKG_USING_UC_CLK is not set -# CONFIG_PKG_USING_UC_COMMON is not set -# CONFIG_PKG_USING_UC_MODBUS is not set -# CONFIG_PKG_USING_FREERTOS_WRAPPER is not set -# CONFIG_PKG_USING_CAIRO is not set -# CONFIG_PKG_USING_PIXMAN is not set -# CONFIG_PKG_USING_PARTITION is not set -# CONFIG_PKG_USING_PERF_COUNTER is not set -# CONFIG_PKG_USING_FLASHDB is not set -# CONFIG_PKG_USING_SQLITE is not set -# CONFIG_PKG_USING_RTI is not set -# CONFIG_PKG_USING_DFS_YAFFS is not set -# CONFIG_PKG_USING_LITTLEFS is not set -# CONFIG_PKG_USING_DFS_JFFS2 is not set -# CONFIG_PKG_USING_DFS_UFFS is not set -# CONFIG_PKG_USING_LWEXT4 is not set -# CONFIG_PKG_USING_THREAD_POOL is not set -# CONFIG_PKG_USING_ROBOTS is not set -# CONFIG_PKG_USING_EV is not set -# CONFIG_PKG_USING_SYSWATCH is not set -# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set -# CONFIG_PKG_USING_PLCCORE is not set -# CONFIG_PKG_USING_RAMDISK is not set -# CONFIG_PKG_USING_MININI is not set -# CONFIG_PKG_USING_QBOOT is not set -# CONFIG_PKG_USING_PPOOL is not set -# CONFIG_PKG_USING_OPENAMP is not set -# CONFIG_PKG_USING_LPM is not set -# CONFIG_PKG_USING_TLSF is not set -# CONFIG_PKG_USING_EVENT_RECORDER is not set -# CONFIG_PKG_USING_ARM_2D is not set -# CONFIG_PKG_USING_MCUBOOT is not set -# CONFIG_PKG_USING_TINYUSB is not set -# CONFIG_PKG_USING_CHERRYUSB is not set -# CONFIG_PKG_USING_KMULTI_RTIMER is not set -# CONFIG_PKG_USING_TFDB is not set -# CONFIG_PKG_USING_QPC is not set -# CONFIG_PKG_USING_AGILE_UPGRADE is not set -# CONFIG_PKG_USING_FLASH_BLOB is not set - -# -# peripheral libraries and drivers -# - -# -# sensors drivers -# -# CONFIG_PKG_USING_LSM6DSM is not set -# CONFIG_PKG_USING_LSM6DSL is not set -# CONFIG_PKG_USING_LPS22HB is not set -# CONFIG_PKG_USING_HTS221 is not set -# CONFIG_PKG_USING_LSM303AGR is not set -# CONFIG_PKG_USING_BME280 is not set -# CONFIG_PKG_USING_BME680 is not set -# CONFIG_PKG_USING_BMA400 is not set -# CONFIG_PKG_USING_BMI160_BMX160 is not set -# CONFIG_PKG_USING_SPL0601 is not set -# CONFIG_PKG_USING_MS5805 is not set -# CONFIG_PKG_USING_DA270 is not set -# CONFIG_PKG_USING_DF220 is not set -# CONFIG_PKG_USING_HSHCAL001 is not set -# CONFIG_PKG_USING_BH1750 is not set -# CONFIG_PKG_USING_MPU6XXX is not set -# CONFIG_PKG_USING_AHT10 is not set -# CONFIG_PKG_USING_AP3216C is not set -# CONFIG_PKG_USING_TSL4531 is not set -# CONFIG_PKG_USING_DS18B20 is not set -# CONFIG_PKG_USING_DHT11 is not set -# CONFIG_PKG_USING_DHTXX is not set -# CONFIG_PKG_USING_GY271 is not set -# CONFIG_PKG_USING_GP2Y10 is not set -# CONFIG_PKG_USING_SGP30 is not set -# CONFIG_PKG_USING_HDC1000 is not set -# CONFIG_PKG_USING_BMP180 is not set -# CONFIG_PKG_USING_BMP280 is not set -# CONFIG_PKG_USING_SHTC1 is not set -# CONFIG_PKG_USING_BMI088 is not set -# CONFIG_PKG_USING_HMC5883 is not set -# CONFIG_PKG_USING_MAX6675 is not set -# CONFIG_PKG_USING_TMP1075 is not set -# CONFIG_PKG_USING_SR04 is not set -# CONFIG_PKG_USING_CCS811 is not set -# CONFIG_PKG_USING_PMSXX is not set -# CONFIG_PKG_USING_RT3020 is not set -# CONFIG_PKG_USING_MLX90632 is not set -# CONFIG_PKG_USING_MLX90393 is not set -# CONFIG_PKG_USING_MLX90392 is not set -# CONFIG_PKG_USING_MLX90397 is not set -# CONFIG_PKG_USING_MS5611 is not set -# CONFIG_PKG_USING_MAX31865 is not set -# CONFIG_PKG_USING_VL53L0X is not set -# CONFIG_PKG_USING_INA260 is not set -# CONFIG_PKG_USING_MAX30102 is not set -# CONFIG_PKG_USING_INA226 is not set -# CONFIG_PKG_USING_LIS2DH12 is not set -# CONFIG_PKG_USING_HS300X is not set -# CONFIG_PKG_USING_ZMOD4410 is not set -# CONFIG_PKG_USING_ISL29035 is not set -# CONFIG_PKG_USING_MMC3680KJ is not set -# CONFIG_PKG_USING_QMP6989 is not set -# CONFIG_PKG_USING_BALANCE is not set -# CONFIG_PKG_USING_SHT2X is not set -# CONFIG_PKG_USING_SHT3X is not set -# CONFIG_PKG_USING_AD7746 is not set -# CONFIG_PKG_USING_ADT74XX is not set -# CONFIG_PKG_USING_MAX17048 is not set -# CONFIG_PKG_USING_AS7341 is not set -# CONFIG_PKG_USING_CW2015 is not set -# CONFIG_PKG_USING_ICM20608 is not set -# CONFIG_PKG_USING_PAJ7620 is not set -# CONFIG_PKG_USING_STHS34PF80 is not set - -# -# touch drivers -# -# CONFIG_PKG_USING_GT9147 is not set -# CONFIG_PKG_USING_GT1151 is not set -# CONFIG_PKG_USING_GT917S is not set -# CONFIG_PKG_USING_GT911 is not set -# CONFIG_PKG_USING_FT6206 is not set -# CONFIG_PKG_USING_FT5426 is not set -# CONFIG_PKG_USING_FT6236 is not set -# CONFIG_PKG_USING_XPT2046_TOUCH is not set -# CONFIG_PKG_USING_REALTEK_AMEBA is not set -# CONFIG_PKG_USING_STM32_SDIO is not set -# CONFIG_PKG_USING_ESP_IDF is not set -# CONFIG_PKG_USING_BUTTON is not set -# CONFIG_PKG_USING_PCF8574 is not set -# CONFIG_PKG_USING_SX12XX is not set -# CONFIG_PKG_USING_SIGNAL_LED is not set -# CONFIG_PKG_USING_LEDBLINK is not set -# CONFIG_PKG_USING_LITTLED is not set -# CONFIG_PKG_USING_LKDGUI is not set -# CONFIG_PKG_USING_NRF5X_SDK is not set -# CONFIG_PKG_USING_NRFX is not set - -# -# Kendryte SDK -# -# CONFIG_PKG_USING_K210_SDK is not set -# CONFIG_PKG_USING_KENDRYTE_SDK is not set -# CONFIG_PKG_USING_INFRARED is not set -# CONFIG_PKG_USING_MULTI_INFRARED is not set -# CONFIG_PKG_USING_AGILE_BUTTON is not set -# CONFIG_PKG_USING_AGILE_LED is not set -# CONFIG_PKG_USING_AT24CXX is not set -# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set -# CONFIG_PKG_USING_PCA9685 is not set -# CONFIG_PKG_USING_ILI9341 is not set -# CONFIG_PKG_USING_I2C_TOOLS is not set -# CONFIG_PKG_USING_NRF24L01 is not set -# CONFIG_PKG_USING_RPLIDAR is not set -# CONFIG_PKG_USING_AS608 is not set -# CONFIG_PKG_USING_RC522 is not set -# CONFIG_PKG_USING_WS2812B is not set -# CONFIG_PKG_USING_EMBARC_BSP is not set -# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set -# CONFIG_PKG_USING_MULTI_RTIMER is not set -# CONFIG_PKG_USING_MAX7219 is not set -# CONFIG_PKG_USING_BEEP is not set -# CONFIG_PKG_USING_EASYBLINK is not set -# CONFIG_PKG_USING_PMS_SERIES is not set -# CONFIG_PKG_USING_CAN_YMODEM is not set -# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set -# CONFIG_PKG_USING_QLED is not set -# CONFIG_PKG_USING_AGILE_CONSOLE is not set -# CONFIG_PKG_USING_LD3320 is not set -# CONFIG_PKG_USING_WK2124 is not set -# CONFIG_PKG_USING_LY68L6400 is not set -# CONFIG_PKG_USING_DM9051 is not set -# CONFIG_PKG_USING_SSD1306 is not set -# CONFIG_PKG_USING_QKEY is not set -# CONFIG_PKG_USING_RS485 is not set -# CONFIG_PKG_USING_RS232 is not set -# CONFIG_PKG_USING_NES is not set -# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set -# CONFIG_PKG_USING_VDEVICE is not set -# CONFIG_PKG_USING_SGM706 is not set -# CONFIG_PKG_USING_STM32WB55_SDK is not set -# CONFIG_PKG_USING_RDA58XX is not set -# CONFIG_PKG_USING_LIBNFC is not set -# CONFIG_PKG_USING_MFOC is not set -# CONFIG_PKG_USING_TMC51XX is not set -# CONFIG_PKG_USING_TCA9534 is not set -# CONFIG_PKG_USING_KOBUKI is not set -# CONFIG_PKG_USING_ROSSERIAL is not set -# CONFIG_PKG_USING_MICRO_ROS is not set -# CONFIG_PKG_USING_MCP23008 is not set -# CONFIG_PKG_USING_BLUETRUM_SDK is not set -# CONFIG_PKG_USING_MISAKA_AT24CXX is not set -# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set -# CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set -# CONFIG_PKG_USING_SOFT_SERIAL is not set -# CONFIG_PKG_USING_MB85RS16 is not set -# CONFIG_PKG_USING_RFM300 is not set -# CONFIG_PKG_USING_IO_INPUT_FILTER is not set -# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set -# CONFIG_PKG_USING_LRF_NV7LIDAR is not set -# CONFIG_PKG_USING_FINGERPRINT is not set - -# -# AI packages -# -# CONFIG_PKG_USING_LIBANN is not set -# CONFIG_PKG_USING_NNOM is not set -# CONFIG_PKG_USING_ONNX_BACKEND is not set -# CONFIG_PKG_USING_ONNX_PARSER is not set -# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set -# CONFIG_PKG_USING_ELAPACK is not set -# CONFIG_PKG_USING_ULAPACK is not set -# CONFIG_PKG_USING_QUEST is not set -# CONFIG_PKG_USING_NAXOS is not set - -# -# Signal Processing and Control Algorithm Packages -# -# CONFIG_PKG_USING_FIRE_PID_CURVE is not set -# CONFIG_PKG_USING_UKAL is not set - -# -# miscellaneous packages -# - -# -# project laboratory -# - -# -# samples: kernel and components samples -# -CONFIG_PKG_USING_KERNEL_SAMPLES=y -CONFIG_PKG_KERNEL_SAMPLES_PATH="/packages/misc/samples/kernel_samples" -# CONFIG_PKG_USING_KERNEL_SAMPLES_V030 is not set -# CONFIG_PKG_USING_KERNEL_SAMPLES_V040 is not set -CONFIG_PKG_USING_KERNEL_SAMPLES_LATEST_VERSION=y -CONFIG_PKG_KERNEL_SAMPLES_VER="latest" -CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y -# CONFIG_PKG_USING_KERNEL_SAMPLES_ZH is not set -# CONFIG_KERNEL_SAMPLES_USING_THREAD is not set -# CONFIG_KERNEL_SAMPLES_USING_SEMAPHORE is not set -# CONFIG_KERNEL_SAMPLES_USING_MUTEX is not set -# CONFIG_KERNEL_SAMPLES_USING_MAILBOX is not set -# CONFIG_KERNEL_SAMPLES_USING_EVENT is not set -# CONFIG_KERNEL_SAMPLES_USING_MESSAGEQUEUE is not set -# CONFIG_KERNEL_SAMPLES_USING_TIMER is not set -# CONFIG_KERNEL_SAMPLES_USING_HEAP is not set -# CONFIG_KERNEL_SAMPLES_USING_MEMHEAP is not set -# CONFIG_KERNEL_SAMPLES_USING_MEMPOOL is not set -# CONFIG_KERNEL_SAMPLES_USING_IDLEHOOK is not set -# CONFIG_KERNEL_SAMPLES_USING_SIGNAL is not set -# CONFIG_KERNEL_SAMPLES_USING_INTERRUPT is not set -# CONFIG_KERNEL_SAMPLES_USING_PRI_INVERSION is not set -# CONFIG_KERNEL_SAMPLES_USING_TIME_SLICE is not set -# CONFIG_KERNEL_SAMPLES_USING_SCHEDULER_HOOK is not set -# CONFIG_KERNEL_SAMPLES_USING_PRODUCER_CONSUMER is not set -# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set -# CONFIG_PKG_USING_NETWORK_SAMPLES is not set -# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set - -# -# entertainment: terminal games and other interesting software packages -# -# CONFIG_PKG_USING_CMATRIX is not set -# CONFIG_PKG_USING_SL is not set -# CONFIG_PKG_USING_CAL is not set -# CONFIG_PKG_USING_ACLOCK is not set -# CONFIG_PKG_USING_THREES is not set -# CONFIG_PKG_USING_2048 is not set -# CONFIG_PKG_USING_SNAKE is not set -# CONFIG_PKG_USING_TETRIS is not set -# CONFIG_PKG_USING_DONUT is not set -# CONFIG_PKG_USING_COWSAY is not set -# CONFIG_PKG_USING_MORSE is not set -# CONFIG_PKG_USING_LIBCSV is not set -# CONFIG_PKG_USING_OPTPARSE is not set -# CONFIG_PKG_USING_FASTLZ is not set -# CONFIG_PKG_USING_MINILZO is not set -# CONFIG_PKG_USING_QUICKLZ is not set -# CONFIG_PKG_USING_LZMA is not set -# CONFIG_PKG_USING_MULTIBUTTON is not set -# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set -# CONFIG_PKG_USING_CANFESTIVAL is not set -# CONFIG_PKG_USING_ZLIB is not set -# CONFIG_PKG_USING_MINIZIP is not set -# CONFIG_PKG_USING_HEATSHRINK is not set -# CONFIG_PKG_USING_DSTR is not set -# CONFIG_PKG_USING_TINYFRAME is not set -# CONFIG_PKG_USING_KENDRYTE_DEMO is not set -# CONFIG_PKG_USING_DIGITALCTRL is not set -# CONFIG_PKG_USING_UPACKER is not set -# CONFIG_PKG_USING_UPARAM is not set -# CONFIG_PKG_USING_HELLO is not set -# CONFIG_PKG_USING_VI is not set -# CONFIG_PKG_USING_KI is not set -# CONFIG_PKG_USING_ARMv7M_DWT is not set -# CONFIG_PKG_USING_CRCLIB is not set -# CONFIG_PKG_USING_LWGPS is not set -# CONFIG_PKG_USING_STATE_MACHINE is not set -# CONFIG_PKG_USING_DESIGN_PATTERN is not set -# CONFIG_PKG_USING_CONTROLLER is not set -# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set -# CONFIG_PKG_USING_MFBD is not set -# CONFIG_PKG_USING_SLCAN2RTT is not set -# CONFIG_PKG_USING_SOEM is not set -# CONFIG_PKG_USING_QPARAM is not set -# CONFIG_PKG_USING_CorevMCU_CLI is not set - -# -# Arduino libraries -# -# CONFIG_PKG_USING_RTDUINO is not set - -# -# Projects -# -# CONFIG_PKG_USING_ARDUINO_ULTRASOUND_RADAR is not set -# CONFIG_PKG_USING_ARDUINO_SENSOR_KIT is not set -# CONFIG_PKG_USING_ARDUINO_MATLAB_SUPPORT is not set - -# -# Sensors -# -# CONFIG_PKG_USING_ARDUINO_SENSOR_DEVICE_DRIVERS is not set -# CONFIG_PKG_USING_ARDUINO_CAPACITIVESENSOR is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL375 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L0X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L1X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSOR is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL6180X is not set -# CONFIG_PKG_USING_ADAFRUIT_MAX31855 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31865 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31856 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX6675 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90614 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM9DS1 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AHTX0 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM9DS0 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP280 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADT7410 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP085 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BME680 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP9808 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP4728 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_INA219 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LTR390 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL345 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DHT is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP9600 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM6DS is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO055 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX1704X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MMC56X3 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90393 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90395 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ICM20X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DPS310 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTS221 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHT4X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHT31 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL343 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BME280 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AS726X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AMG88XX is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AM2320 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AM2315 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LTR329_LTR303 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP085_UNIFIED is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP183 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP183_UNIFIED is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BMP3XX is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MS8607 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS3MDL is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90640 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MMA8451 is not set -# CONFIG_PKG_USING_ADAFRUIT_MSA301 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPL115A2 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X_RVC is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS2MDL is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM303DLH_MAG is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LC709203F is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_CAP1188 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_CCS811 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_NAU7802 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS331 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LPS2X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LPS35HW is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM303_ACCEL is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS3DH is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8591 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPL3115A2 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPR121 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPRLS is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPU6050 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCT2075 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PM25AQI is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_EMC2101 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_FXAS21002C is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SCD30 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_FXOS8700 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HMC5883_UNIFIED is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SGP30 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP006 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TLA202X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TCS34725 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI7021 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI1145 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SGP40 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SHTC3 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HDC1000 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTU21DF is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AS7341 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTU31D is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSORLAB is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_INA260 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP007_LIBRARY is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_L3GD20 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP117 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TSC2007 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TSL2561 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TSL2591_LIBRARY is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VCNL4040 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML6070 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML6075 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML7700 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LIS3DHTR is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_DHT is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_ADXL335 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_ADXL345 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BME280 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BMP280 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_H3LIS331DL is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_MMA7660 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_TSL2561 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_PAJ7620 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_VL53L0X is not set -# CONFIG_PKG_USING_SEEED_ITG3200 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_SHT31 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HP20X is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_DRV2605L is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BBM150 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HMC5883L is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LSM303DLH is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_TCS3414CS is not set -# CONFIG_PKG_USING_SEEED_MP503 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BMP085 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HIGHTEMP is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_VEML6070 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_SI1145 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_SHT35 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_AT42QT1070 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LSM6DS3 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HDC1000 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HM3301 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_MCP9600 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LTC2941 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LDC1612 is not set - -# -# Display -# -# CONFIG_PKG_USING_ARDUINO_U8G2 is not set -# CONFIG_PKG_USING_ARDUINO_U8GLIB_ARDUINO is not set -# CONFIG_PKG_USING_SEEED_TM1637 is not set - -# -# Timing -# -# CONFIG_PKG_USING_ARDUINO_MSTIMER2 is not set - -# -# Data Processing -# -# CONFIG_PKG_USING_ARDUINO_KALMANFILTER is not set -# CONFIG_PKG_USING_ARDUINO_ARDUINOJSON is not set - -# -# Data Storage -# - -# -# Communication -# -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PN532 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI4713 is not set - -# -# Device Control -# -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8574 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCA9685 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_PCF85063TP is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TPA2016 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DRV2605 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS1841 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS3502 is not set - -# -# Other -# -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351 is not set -# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set - -# -# Signal IO -# -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BUSIO is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TCA8418 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP23017 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADS1X15 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AW9523 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP3008 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP4725 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BD3491FS is not set - -# -# Uncategorized -# - -# -# Hardware Drivers -# - -# -# On-chip Peripheral Drivers -# -CONFIG_BSP_USING_UART=y -CONFIG_RT_USING_UART1=y -# CONFIG_RT_USING_UART0 is not set -# CONFIG_BSP_USING_SPI is not set -# CONFIG_BSP_USING_CAN is not set -# CONFIG_BSP_USING_QSPI is not set - -# -# Board extended module Drivers -# -CONFIG_BSP_USING_GIC=y -CONFIG_BSP_USING_GICV3=y -CONFIG_PHYTIUM_ARCH_AARCH64=y -CONFIG_ARM_SPI_BIND_CPU_ID=0 - -# -# Standalone Setting -# -CONFIG_TARGET_ARMV8_AARCH64=y - -# -# Board Configuration -# -# CONFIG_TARGET_F2000_4 is not set -# CONFIG_TARGET_D2000 is not set -# CONFIG_TARGET_E2000Q is not set -CONFIG_TARGET_E2000D=y -# CONFIG_TARGET_E2000S is not set -CONFIG_TARGET_E2000=y -CONFIG_DEFAULT_DEBUG_PRINT_UART1=y -# CONFIG_DEFAULT_DEBUG_PRINT_UART0 is not set -# CONFIG_DEFAULT_DEBUG_PRINT_UART2 is not set - -# -# Components Configuration -# -CONFIG_USE_SPI=y -CONFIG_USE_FSPIM=y -CONFIG_USE_QSPI=y - -# -# Qspi Configuration -# -CONFIG_USE_FQSPI=y -# CONFIG_USE_GIC is not set -CONFIG_USE_SERIAL=y - -# -# Usart Configuration -# -CONFIG_ENABLE_Pl011_UART=y -# CONFIG_USE_GPIO is not set -# CONFIG_USE_ETH is not set -# CONFIG_USE_CAN is not set -# CONFIG_USE_I2C is not set -# CONFIG_USE_TIMER is not set -# CONFIG_USE_MIO is not set -# CONFIG_USE_SDMMC is not set -# CONFIG_USE_PCIE is not set -# CONFIG_USE_WDT is not set -# CONFIG_USE_DMA is not set -# CONFIG_USE_NAND is not set -# CONFIG_USE_RTC is not set -# CONFIG_USE_SATA is not set -# CONFIG_USE_USB is not set -# CONFIG_USE_ADC is not set -# CONFIG_USE_PWM is not set -# CONFIG_USE_IPC is not set -# CONFIG_USE_MEDIA is not set -# CONFIG_USE_SCMI_MHU is not set -# CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set -# CONFIG_LOG_INFO is not set -# CONFIG_LOG_WARN is not set -CONFIG_LOG_ERROR=y -# CONFIG_LOG_NONE is not set -# CONFIG_USE_DEFAULT_INTERRUPT_CONFIG is not set -# CONFIG_LOG_EXTRA_INFO is not set -# CONFIG_LOG_DISPALY_CORE_NUM is not set -# CONFIG_BOOTUP_DEBUG_PRINTS is not set diff --git a/bsp/phytium/aarch64/Kconfig b/bsp/phytium/aarch64/Kconfig index fd6dfa0818b..7426d206d91 100644 --- a/bsp/phytium/aarch64/Kconfig +++ b/bsp/phytium/aarch64/Kconfig @@ -61,6 +61,10 @@ if TARGET_PHYTIUMPI default 2 endif +if RT_USING_SMP + +endif + menu "Standalone Setting" config TARGET_ARMV8_AARCH64 bool "Armv8 Aarch64" diff --git a/bsp/phytium/aarch64/applications/main.c b/bsp/phytium/aarch64/applications/main.c index 24379b50c05..cd07e9c0ca4 100644 --- a/bsp/phytium/aarch64/applications/main.c +++ b/bsp/phytium/aarch64/applications/main.c @@ -16,6 +16,20 @@ #include +#define ASSERT_STATIC(expression) \ + extern int assert_static[(expression) ? 1 : -1] + +/* check if SMP related setting ok */ +#ifndef RT_USING_SMP +ASSERT_STATIC(RT_CPUS_NR == 1U); /* please set RT_CPUS_NR = 1 when SMP off */ +#else +#if defined(TARGET_E2000D) +ASSERT_STATIC(RT_CPUS_NR <= 2U); /* use 2 cores at most */ +#elif defined(TARGET_E2000Q) || defined(TARGET_PHYTIUMPI) +ASSERT_STATIC(RT_CPUS_NR <= 4U); /* use 4 cores at most */ +#endif +#endif + #ifdef RT_USING_SMP struct rt_thread test_core[RT_CPUS_NR]; diff --git a/bsp/phytium/aarch64/applications/mnt.c b/bsp/phytium/aarch64/applications/mnt.c index ac3ace2a20b..5f947f99c88 100644 --- a/bsp/phytium/aarch64/applications/mnt.c +++ b/bsp/phytium/aarch64/applications/mnt.c @@ -18,79 +18,119 @@ #include #include -#ifdef BSP_USING_SDCARD_FATFS -#define SD_DEIVCE_NAME "sd" -static int filesystem_mount(void) +static int ram_disk_mount(const char *mount_point) { - while (rt_device_find(SD_DEIVCE_NAME) == RT_NULL) - { - rt_thread_mdelay(1); - } - - if (dfs_mount(SD_DEIVCE_NAME, "/", "elm", 0, 0) == 0) - { - LOG_I("file system initialization done!\n"); - } - else - { - LOG_E("[sd] File System on SD initialization failed!"); - LOG_E("[sd] Please format SD Card as FAT32!!!..."); - 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; + rt_err_t err = RT_EOK; pool = rt_malloc(size); if (pool == RT_NULL) - { LOG_E("Malloc fail!"); + + err = dfs_mount(RT_NULL, mount_point, "ram", 0, (const void *)dfs_ramfs_create(pool, size)); + if (err == RT_EOK) + LOG_I("RAM file system initializated!"); + else + LOG_E("RAM file system initializate failed!, err = %d", err); +#endif + + return RT_EOK; +} + +#ifdef BSP_USING_SDCARD_FATFS +extern void fsdif_change(void); +static int sd_disk_try_mount(char *device_name, char *mount_point, char *fs_type_name, int mkfs_count) +{ + struct statfs fs_stat; + int rc = 0; + + LOG_I("mount(\"%s\",\"%s\",\"%s\");", device_name, mount_point, fs_type_name); + + if (rt_device_find(device_name) == NULL) + { + LOG_I("%s not find!!!", device_name); + return -RT_EIO; } - if (dfs_mount(RT_NULL, "/ram", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0) + mkdir(mount_point, 0); +_remount: + rc = dfs_mount(device_name, mount_point, fs_type_name, 0, 0); + if (rc == 0) { - LOG_I("RAM file system initializated!"); + LOG_I("mounted %s on %s", device_name, mount_point); + if (dfs_statfs(mount_point, &fs_stat) >= 0) + { + LOG_I("%s size:%d, total: %d, free: %d", mount_point, + fs_stat.f_bsize, fs_stat.f_blocks, fs_stat.f_bfree); + } } else { - LOG_E("RAM file system initializate failed!"); + if (mkfs_count > 0) + { + /* LOG_I("[%s]try mkfs -t %s %s ", mkfs_count, fs_type_name, device_name); + dfs_mkfs(fs_type_name, device_name); */ + mkfs_count--; + LOG_E("%s is not in %s, please format first !!!", device_name, fs_type_name); + goto _remount; + } + + LOG_I("mount failed :%d ", rc); + return -RT_EIO; } -#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; +static void sd_filesytem_task_entry(void *parameter) +{ + int result; + LOG_D("sdio host change: %d", change); + mmcsd_wait_cd_changed(0); /* clear */ + fsdif_change(); /* send cd change to host */ - pool = rt_malloc(size); - if (pool == RT_NULL) + /* block until plug/unplug event happens */ + result = mmcsd_wait_cd_changed(RT_WAITING_FOREVER); + if (result == MMCSD_HOST_PLUGED) { - LOG_E("Malloc fail!"); + rt_kprintf("mmcsd change pluged \n"); + /* mount sdcard partition as / */ + if (RT_EOK == sd_disk_try_mount(BSP_USING_SDCARD_PARTITION, "/", "elm", 0)) + { + ram_disk_mount("/ram"); /* mount ramdisk if configured */ + } } +} - if (dfs_mount(RT_NULL, "/", "ram", 0, (const void *)dfs_ramfs_create(pool, size)) == 0) +int filesystem_mount(void) +{ + rt_thread_t tid; + tid = rt_thread_create("sd_filesytem", sd_filesytem_task_entry, + RT_NULL, + 4096, + RT_THREAD_PRIORITY_MAX - 2, 20); + if (tid != RT_NULL) { - LOG_I("RAM file system initializated!"); + rt_thread_startup(tid); } else { - LOG_E("RAM file system initializate failed!"); + LOG_E("create sd mount task error!"); } -#endif return RT_EOK; } +INIT_APP_EXPORT(filesystem_mount); + +#else +static int filesystem_mount(void) +{ + return ram_disk_mount("/"); /* mount ramdisk as / */ +} INIT_ENV_EXPORT(filesystem_mount); #endif // #ifdef BSP_USING_SDCARD_FATFS #endif // #if defined(RT_USING_DFS) \ No newline at end of file diff --git a/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart b/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart index 64b03119b10..0138e558644 100644 --- a/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart +++ b/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMART=y # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=2 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=8192 +CONFIG_SYSTEM_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192 @@ -895,6 +896,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # diff --git a/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart.h b/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart.h index cca2d2f0992..e73fac6b26a 100644 --- a/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart.h +++ b/bsp/phytium/aarch64/configs/e2000d_demo_rtsmart.h @@ -8,7 +8,8 @@ #define RT_NAME_MAX 16 #define RT_USING_SMART -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 2 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -19,6 +20,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #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 8192 diff --git a/bsp/phytium/aarch64/configs/e2000d_demo_rtthread b/bsp/phytium/aarch64/configs/e2000d_demo_rtthread index 0f550e7375c..9c049c392aa 100644 --- a/bsp/phytium/aarch64/configs/e2000d_demo_rtthread +++ b/bsp/phytium/aarch64/configs/e2000d_demo_rtthread @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=2 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=8192 +CONFIG_SYSTEM_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192 @@ -879,6 +880,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # diff --git a/bsp/phytium/aarch64/configs/e2000d_demo_rtthread.h b/bsp/phytium/aarch64/configs/e2000d_demo_rtthread.h index cf8140da480..8e56e6c5d82 100644 --- a/bsp/phytium/aarch64/configs/e2000d_demo_rtthread.h +++ b/bsp/phytium/aarch64/configs/e2000d_demo_rtthread.h @@ -7,7 +7,8 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 16 -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 2 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -18,6 +19,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #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 8192 diff --git a/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart b/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart index f9f31e11ba9..8b21d4b5972 100644 --- a/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart +++ b/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMART=y # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=8192 +CONFIG_SYSTEM_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192 @@ -895,6 +896,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1288,7 +1290,6 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y # # Board Configuration # -# CONFIG_E2000D_DEMO_BOARD is not set CONFIG_BOARD_NAME="demo" # CONFIG_USE_SPI_IOPAD is not set # CONFIG_USE_GPIO_IOPAD is not set diff --git a/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart.h b/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart.h index cd0ae5595a6..217b0c05246 100644 --- a/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart.h +++ b/bsp/phytium/aarch64/configs/e2000q_demo_rtsmart.h @@ -8,7 +8,8 @@ #define RT_NAME_MAX 16 #define RT_USING_SMART -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 4 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -19,6 +20,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #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 8192 diff --git a/bsp/phytium/aarch64/configs/e2000q_demo_rtthread b/bsp/phytium/aarch64/configs/e2000q_demo_rtthread index b0ff06b510a..6da92dc00e4 100644 --- a/bsp/phytium/aarch64/configs/e2000q_demo_rtthread +++ b/bsp/phytium/aarch64/configs/e2000q_demo_rtthread @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=8192 +CONFIG_SYSTEM_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192 @@ -881,6 +882,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # diff --git a/bsp/phytium/aarch64/configs/e2000q_demo_rtthread.h b/bsp/phytium/aarch64/configs/e2000q_demo_rtthread.h index 19c1275d2f8..ed305a21718 100644 --- a/bsp/phytium/aarch64/configs/e2000q_demo_rtthread.h +++ b/bsp/phytium/aarch64/configs/e2000q_demo_rtthread.h @@ -7,7 +7,8 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 16 -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 4 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -18,6 +19,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #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 8192 diff --git a/bsp/phytium/aarch64/configs/phytium_pi_rtsmart b/bsp/phytium/aarch64/configs/phytium_pi_rtsmart index b092fd118aa..cbc03f684fe 100644 --- a/bsp/phytium/aarch64/configs/phytium_pi_rtsmart +++ b/bsp/phytium/aarch64/configs/phytium_pi_rtsmart @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMART=y # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -24,6 +24,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=8192 +CONFIG_SYSTEM_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192 @@ -212,7 +213,13 @@ CONFIG_RT_USING_RANDOM=y CONFIG_RT_USING_RTC=y # CONFIG_RT_USING_ALARM is not set # CONFIG_RT_USING_SOFT_RTC is not set -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_SDIO=y +CONFIG_RT_SDIO_STACK_SIZE=8192 +CONFIG_RT_SDIO_THREAD_PRIORITY=15 +CONFIG_RT_MMCSD_STACK_SIZE=8192 +CONFIG_RT_MMCSD_THREAD_PREORITY=22 +CONFIG_RT_MMCSD_MAX_PARTITION=16 +# CONFIG_RT_SDIO_DEBUG is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -347,7 +354,7 @@ CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=16184 # CONFIG_LWIP_NO_RX_THREAD is not set # CONFIG_LWIP_NO_TX_THREAD is not set CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12 -CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=2048 +CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=8192 CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8 # CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 @@ -895,6 +902,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1248,7 +1256,12 @@ CONFIG_RT_USING_UART1=y # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_PWM is not set # CONFIG_BSP_USING_I2C is not set -# CONFIG_BSP_USING_SDIF is not set +CONFIG_BSP_USING_SDIF=y +CONFIG_BSP_USING_SDCARD_FATFS=y +CONFIG_BSP_USING_SDCARD_PARTITION="sd1" +CONFIG_USING_SDIF0=y +# CONFIG_USING_SDIF1 is not set +# CONFIG_USING_EMMC is not set # # Board extended module Drivers @@ -1308,10 +1321,10 @@ CONFIG_FIREFLY_DEMO_BOARD=y # Sdk common configuration # # CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set +CONFIG_LOG_DEBUG=y # CONFIG_LOG_INFO is not set # CONFIG_LOG_WARN is not set -CONFIG_LOG_ERROR=y +# CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set # CONFIG_LOG_EXTRA_INFO is not set # CONFIG_LOG_DISPALY_CORE_NUM is not set diff --git a/bsp/phytium/aarch64/configs/phytium_pi_rtsmart.h b/bsp/phytium/aarch64/configs/phytium_pi_rtsmart.h index 97e587a7a4b..30ff5d64aff 100644 --- a/bsp/phytium/aarch64/configs/phytium_pi_rtsmart.h +++ b/bsp/phytium/aarch64/configs/phytium_pi_rtsmart.h @@ -8,7 +8,8 @@ #define RT_NAME_MAX 16 #define RT_USING_SMART -#define RT_CPUS_NR 1 +#define RT_USING_SMP +#define RT_CPUS_NR 4 #define RT_ALIGN_SIZE 4 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -19,6 +20,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #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 8192 @@ -142,6 +144,12 @@ #define RT_USING_ZERO #define RT_USING_RANDOM #define RT_USING_RTC +#define RT_USING_SDIO +#define RT_SDIO_STACK_SIZE 8192 +#define RT_SDIO_THREAD_PRIORITY 15 +#define RT_MMCSD_STACK_SIZE 8192 +#define RT_MMCSD_THREAD_PREORITY 22 +#define RT_MMCSD_MAX_PARTITION 16 #define RT_USING_KTIME /* Using USB */ @@ -218,7 +226,7 @@ #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_STACKSIZE 8192 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 #define LWIP_NETIF_STATUS_CALLBACK 1 #define LWIP_NETIF_LINK_CALLBACK 1 @@ -377,6 +385,10 @@ #define BSP_USING_IOPAD #define BSP_USING_UART #define RT_USING_UART1 +#define BSP_USING_SDIF +#define BSP_USING_SDCARD_FATFS +#define BSP_USING_SDCARD_PARTITION "sd1" +#define USING_SDIF0 /* Board extended module Drivers */ @@ -411,7 +423,7 @@ /* Sdk common configuration */ -#define LOG_ERROR +#define LOG_DEBUG /* Image information configuration */ diff --git a/bsp/phytium/aarch64/configs/phytium_pi_rtthread b/bsp/phytium/aarch64/configs/phytium_pi_rtthread index e9f593db266..c65e8998d28 100644 --- a/bsp/phytium/aarch64/configs/phytium_pi_rtthread +++ b/bsp/phytium/aarch64/configs/phytium_pi_rtthread @@ -10,8 +10,8 @@ CONFIG_RT_NAME_MAX=16 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_AMP is not set -# CONFIG_RT_USING_SMP is not set -CONFIG_RT_CPUS_NR=1 +CONFIG_RT_USING_SMP=y +CONFIG_RT_CPUS_NR=4 CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set CONFIG_RT_THREAD_PRIORITY_32=y @@ -200,7 +200,13 @@ CONFIG_RT_USING_RANDOM=y CONFIG_RT_USING_RTC=y # CONFIG_RT_USING_ALARM is not set # CONFIG_RT_USING_SOFT_RTC is not set -# CONFIG_RT_USING_SDIO is not set +CONFIG_RT_USING_SDIO=y +CONFIG_RT_SDIO_STACK_SIZE=8192 +CONFIG_RT_SDIO_THREAD_PRIORITY=15 +CONFIG_RT_MMCSD_STACK_SIZE=8192 +CONFIG_RT_MMCSD_THREAD_PREORITY=22 +CONFIG_RT_MMCSD_MAX_PARTITION=16 +# CONFIG_RT_SDIO_DEBUG is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -333,7 +339,7 @@ CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=16184 # CONFIG_LWIP_NO_RX_THREAD is not set # CONFIG_LWIP_NO_TX_THREAD is not set CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12 -CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=2048 +CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=8192 CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8 # CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 @@ -881,6 +887,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_ST7789 is not set # CONFIG_PKG_USING_VS1003 is not set # CONFIG_PKG_USING_X9555 is not set +# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -1234,7 +1241,12 @@ CONFIG_RT_USING_UART1=y # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_PWM is not set # CONFIG_BSP_USING_I2C is not set -# CONFIG_BSP_USING_SDIF is not set +CONFIG_BSP_USING_SDIF=y +CONFIG_BSP_USING_SDCARD_FATFS=y +CONFIG_BSP_USING_SDCARD_PARTITION="sd1" +CONFIG_USING_SDIF0=y +# CONFIG_USING_SDIF1 is not set +# CONFIG_USING_EMMC is not set # # Board extended module Drivers @@ -1295,10 +1307,10 @@ CONFIG_FIREFLY_DEMO_BOARD=y # Sdk common configuration # # CONFIG_LOG_VERBOS is not set -# CONFIG_LOG_DEBUG is not set +CONFIG_LOG_DEBUG=y # CONFIG_LOG_INFO is not set # CONFIG_LOG_WARN is not set -CONFIG_LOG_ERROR=y +# CONFIG_LOG_ERROR is not set # CONFIG_LOG_NONE is not set # CONFIG_LOG_EXTRA_INFO is not set # CONFIG_LOG_DISPALY_CORE_NUM is not set diff --git a/bsp/phytium/aarch64/configs/phytium_pi_rtthread.h b/bsp/phytium/aarch64/configs/phytium_pi_rtthread.h index e28c1056e52..1c11c47fa5c 100644 --- a/bsp/phytium/aarch64/configs/phytium_pi_rtthread.h +++ b/bsp/phytium/aarch64/configs/phytium_pi_rtthread.h @@ -132,6 +132,12 @@ #define RT_USING_ZERO #define RT_USING_RANDOM #define RT_USING_RTC +#define RT_USING_SDIO +#define RT_SDIO_STACK_SIZE 8192 +#define RT_SDIO_THREAD_PRIORITY 15 +#define RT_MMCSD_STACK_SIZE 8192 +#define RT_MMCSD_THREAD_PREORITY 22 +#define RT_MMCSD_MAX_PARTITION 16 #define RT_USING_KTIME /* Using USB */ @@ -208,7 +214,7 @@ #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_STACKSIZE 8192 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 #define LWIP_NETIF_STATUS_CALLBACK 1 #define LWIP_NETIF_LINK_CALLBACK 1 @@ -367,6 +373,10 @@ #define BSP_USING_IOPAD #define BSP_USING_UART #define RT_USING_UART1 +#define BSP_USING_SDIF +#define BSP_USING_SDCARD_FATFS +#define BSP_USING_SDCARD_PARTITION "sd1" +#define USING_SDIF0 /* Board extended module Drivers */ @@ -401,7 +411,7 @@ /* Sdk common configuration */ -#define LOG_ERROR +#define LOG_DEBUG /* Image information configuration */ diff --git a/bsp/phytium/aarch64/rtconfig.h b/bsp/phytium/aarch64/rtconfig.h index cf8140da480..1c11c47fa5c 100644 --- a/bsp/phytium/aarch64/rtconfig.h +++ b/bsp/phytium/aarch64/rtconfig.h @@ -128,6 +128,16 @@ #define RT_USING_SERIAL_V1 #define RT_SERIAL_USING_DMA #define RT_SERIAL_RB_BUFSZ 64 +#define RT_USING_NULL +#define RT_USING_ZERO +#define RT_USING_RANDOM +#define RT_USING_RTC +#define RT_USING_SDIO +#define RT_SDIO_STACK_SIZE 8192 +#define RT_SDIO_THREAD_PRIORITY 15 +#define RT_MMCSD_STACK_SIZE 8192 +#define RT_MMCSD_THREAD_PREORITY 22 +#define RT_MMCSD_MAX_PARTITION 16 #define RT_USING_KTIME /* Using USB */ @@ -204,7 +214,7 @@ #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_STACKSIZE 8192 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 #define LWIP_NETIF_STATUS_CALLBACK 1 #define LWIP_NETIF_LINK_CALLBACK 1 @@ -363,13 +373,17 @@ #define BSP_USING_IOPAD #define BSP_USING_UART #define RT_USING_UART1 +#define BSP_USING_SDIF +#define BSP_USING_SDCARD_FATFS +#define BSP_USING_SDCARD_PARTITION "sd1" +#define USING_SDIF0 /* Board extended module Drivers */ #define BSP_USING_GIC #define BSP_USING_GICV3 #define PHYTIUM_ARCH_AARCH64 -#define ARM_SPI_BIND_CPU_ID 0 +#define ARM_SPI_BIND_CPU_ID 2 /* Standalone Setting */ @@ -377,10 +391,9 @@ /* Soc configuration */ -#define TARGET_E2000D -#define SOC_NAME "e2000" -#define TARGET_TYPE_NAME "d" -#define SOC_CORE_NUM 2 +#define TARGET_PHYTIUMPI +#define SOC_NAME "phytiumpi" +#define SOC_CORE_NUM 4 #define F32BIT_MEMORY_ADDRESS 0x80000000 #define F32BIT_MEMORY_LENGTH 0x80000000 #define F64BIT_MEMORY_ADDRESS 0x2000000000 @@ -390,15 +403,15 @@ /* Board Configuration */ -#define E2000D_DEMO_BOARD -#define BOARD_NAME "demo" +#define BOARD_NAME "firefly" +#define FIREFLY_DEMO_BOARD /* IO mux configuration when board start up */ /* Sdk common configuration */ -#define LOG_ERROR +#define LOG_DEBUG /* Image information configuration */ diff --git a/bsp/phytium/doc/use_phytium_pi_sd_image.md b/bsp/phytium/doc/use_phytium_pi_sd_image.md new file mode 100644 index 00000000000..cc6843e2b63 --- /dev/null +++ b/bsp/phytium/doc/use_phytium_pi_sd_image.md @@ -0,0 +1,138 @@ +# 飞腾派上开发和固化 RT-Thread 程序 + +> 本文主要介绍如何在飞腾派中进行 RT-Thread 程序的开发和固化 + +- 飞腾派开发板是一款面向广大工程师和爱好者的开源硬件。主板处理器采用飞腾四核处理器,兼容 ARM v8 指令集,主频最高可达 1.8GHz +- 由于默认系统需要 16G 的空间,推荐使用 32G 的 SD 卡开发 RT-Thread 程序 + +## 开发和调试程序 + +- 在开发和调试程序的阶段可以参考 [Usage](.././README.md) 编译 RT-Thread 程序,通过网络串口等方式下载到飞腾派的 RAM 中直接运行 + +## 使用飞腾派 RT-Thread 镜像 + +- 如果需要固化 RT-Thread 程序镜像在 SD 卡中,并实现开机自启动,可以使用下列的镜像,镜像中包含飞腾派的启动固件、飞腾派OS和一个 RT-Thread 的启动分区 + +- [镜像下载链接](https://pan.baidu.com/s/1eL2ElKeVBU5GOyvzn2kl-A),提取码:PIIM + +- 下载之后解压,使用 sdcard-rtthread.img + + ``` + ----------------------------------------------------------------------------------- + | | | | + | 64MB (系统镜像) | 16G (Phytium Pi OS 根文件系统) | 4G (RT-Thread文件系统) | + | (无格式) | (ext4格式) | (fat32格式) | + ---------------------------------------------------------------------------------- + ``` + +- Windows 上使用 balenaEtcher 工具烧入一张 SD 卡(>= 32G),镜像的格式如下图所示,由3个分区组成,前 64MB 是二进制无格式的启动镜像,然后 16G 是 Phytium Pi OS 的根文件系统,格式为 ext4,最后 4G 是 RT-Thread 文件系统,格式为 fat32, + +- 在 linux 系统上,可以使用 dd 命令将镜像写入 SD 卡 (/dev/sdd) + + ``` + sudo dd if=./sdcard-rtthread-4g.img of=/dev/sdd bs=1M count=20000 status=progress + ``` + +- SD 卡烧入完成之后插入飞腾派 SD 卡槽,重启飞腾派就会自动进入 RT-Thread 系统, + + ``` + Loading Environment from MMC... OK + In: uart@2800d000 + Out: uart@2800d000 + Err: uart@2800d000 + Net: eth0: ethernet@3200c000 + scanning bus for devices... + SATA link 0 timeout. + AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode + flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst + SATA link 0 timeout. + AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode + flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst + Hit any key to stop autoboot: 0 + 739360 bytes read in 206 ms (3.4 MiB/s) + ## Starting application at 0x80080000 ... + + \ | / + - RT - Thread Operating System + / | \ 5.1.0 build Nov 9 2023 09:13:25 + 2006 - 2022 Copyright by RT-Thread team + do components initialization. + initialize rti_board_end:0 done + initialize dfs_init:0 done + initialize rt_work_sys_workqueue_init:0 done + initialize rt_mmcsd_core_init:0 done + ``` + +## 更新飞腾派 RT-Thread 镜像 + +- 有两种方式可以更新 SD 卡第三个分区中的 RT-Thread 镜像 +- 1. 将 SD 卡插入一台能识别第三个分区的电脑 (Ubuntu 系统能识别,Windows 可能不能识别),直接将 RT-Thread 镜像复制入 SD 卡 +- 2. 可以通过 u-boot 上传 RT-Thread 镜像,然后保存在 SD 卡第三个分区中,注意保存文件的大小 (0xc0000),要超过 tftpboot 加载的文件大小 + + ``` + Phytium-Pi#setenv ipaddr 192.168.4.20;setenv serverip 192.168.4.50;setenv gatewayip 192.168.4.1; + Phytium-Pi#tftpboot 0x90100000 rtthread_a64.bin + ethernet@3200c000: PHY present at 0 + ethernet@3200c000: Starting autonegotiation... + ethernet@3200c000: Autonegotiation complete + ethernet@3200c000: link up, 1000Mbps full-duplex (lpa: 0x2800) + ft sgmii speed 1000M! + Using ethernet@3200c000 device + TFTP from server 192.168.4.50; our IP address is 192.168.4.20 + Filename 'rtthread_a64.bin'. + Load address: 0x90100000 + Loading: ################################################################# + ################################################################# + ############### + 133.8 KiB/s + done + Bytes transferred = 739840 (b4a00 hex) + Phytium-Pi#fatls mmc 0:2 + rtthread-images/ + .Trash-1000/ + ram/ + System Volume Information/ + + 0 file(s), 4 dir(s) + + Phytium-Pi#fatwrite mmc 0:2 0x90100000 rtthread-images/rtthread_a64.bin 0xc0000 + 786432 bytes written in 398 ms (1.9 MiB/s) + Phytium-Pi#fatls mmc 0:2 rtthread-images + ./ + ../ + 786432 rtthread_a64.bin + 944384 rtsmart_a64.bin + 950828 rtsmart_a32.bin + 722580 rtthread_a32.bin + + 4 file(s), 2 dir(s) + + Phytium-Pi# + ``` + +## 修改自启动的 RT-Thread 镜像 + +- 通过在 u-boot 控制台修改 bootcmd,可以指定不同的 RT-Thread 镜像自启动,如下所示,指定启动 RT-Smart 镜像 `rtsmart_a64.bin` + + ``` + Phytium-Pi#printenv bootcmd + bootcmd=mw 0x32b301a8 0x275;mmc dev 0;mmc read 0x90000000 0x2000 0x10000;bootm 0x90000000#phytium + Phytium-Pi#setenv bootcmd "fatload mmc 0:2 0x80080000 rtthread-images/rtthread_a64.bin;dcache flush;go 0x80080000;" + Phytium-Pi#saveenv + ``` + + +## 切换成 linux 开发模式 + +- 本文提供的 RT-Thread 开发镜像中,有一个 linux 系统,需要的时候可以修改 bootcmd,切换成自启动 linux 系统 + + ``` + Phytium-Pi#setenv bootcmd "mw 0x32b301a8 0x275;mmc dev 0;mmc read 0x90000000 0x2000 0x10000;bootm 0x90000000#phytium" + Phytium-Pi#saveenv + Saving Environment to MMC... Writing to MMC(0)... OK + ``` + +## 在 RT-Thread 应用中访问 SD 卡分区 + +- 如前面介绍的,RT-Thread 应用可以使用第二个分区,分区文件系统格式为 FAT32 +- 打开配置 BSP_USING_SDCARD_FATFS 后, RT-Thread / RT-Smart 启动过程中会将 SD 卡挂载为根目录,将配置 BSP_USING_SDCARD_PARTITION 设置为 `sd1`,指定第二个分区为 RT-Thread 根目录,启动后创建的文件都会使用这个 SD 分区 \ No newline at end of file diff --git a/bsp/phytium/libraries/SConscript b/bsp/phytium/libraries/SConscript index 8f1f6939788..68afcc11b85 100644 --- a/bsp/phytium/libraries/SConscript +++ b/bsp/phytium/libraries/SConscript @@ -80,7 +80,7 @@ if GetDepend(['BSP_USING_ETH']): ## sdif if GetDepend(['BSP_USING_SDIF']): - src += Glob(STANDALONE_DIR+'/drivers/mmc/fsdif/*.c') + Glob(STANDALONE_DIR+'/drivers/mmc/fsdif/*.S') + src += Glob(STANDALONE_DIR+'/drivers/mmc/fsdif/*.c') + Glob(PORT_DRV_DIR+'/drv_sdif.c') path += [STANDALONE_DIR + '/drivers/mmc/fsdif/'] ## gpio @@ -113,14 +113,23 @@ if GetDepend(['E2000D_DEMO_BOARD']): src += Glob(STANDALONE_DIR+'/board/e2000d_demo/fio_mux.c') path += [STANDALONE_DIR + '/board/e2000d_demo/'] + if GetDepend(['BSP_USING_SDIF']): + src += Glob(STANDALONE_DIR+'/board/e2000d_demo/fsdif_timing.c') + if GetDepend(['E2000Q_DEMO_BOARD']): src += Glob(STANDALONE_DIR+'/board/e2000q_demo/fio_mux.c') path += [STANDALONE_DIR + '/board/e2000q_demo/'] + if GetDepend(['BSP_USING_SDIF']): + src += Glob(STANDALONE_DIR+'/board/e2000q_demo/fsdif_timing.c') + if GetDepend(['FIREFLY_DEMO_BOARD']): src += Glob(STANDALONE_DIR+'/board/firefly/fio_mux.c') path += [STANDALONE_DIR + '/board/firefly/'] + if GetDepend(['BSP_USING_SDIF']): + src += Glob(STANDALONE_DIR+'/board/firefly/fsdif_timing.c') + ## fdriver port src += Glob(cwd+'/port/fdriver_port/*.c') path += [cwd + '/port/fdriver_port'] diff --git a/bsp/phytium/libraries/drivers/Kconfig b/bsp/phytium/libraries/drivers/Kconfig index a91a0a910c4..34993db395c 100644 --- a/bsp/phytium/libraries/drivers/Kconfig +++ b/bsp/phytium/libraries/drivers/Kconfig @@ -206,7 +206,7 @@ menu "On-chip Peripheral Drivers" endif menuconfig BSP_USING_SDIF - bool "Enable SDIO" + bool "Enable SDIF" default n select RT_USING_SDIO @@ -216,6 +216,12 @@ menu "On-chip Peripheral Drivers" select RT_USING_DFS_ELMFAT default n + if BSP_USING_SDCARD_FATFS + config BSP_USING_SDCARD_PARTITION + string "Set SDCARD (FATFS) partition index" + default "sd0" + endif + choice prompt "Choose a card to mount" default USING_SDIF1 @@ -230,11 +236,6 @@ menu "On-chip Peripheral Drivers" bool "Use EMMC" endchoice - config SDCARD_OFFSET - hex "Block Offset" - default 0x0 - help - Skip access start paration of SD Card to protect BIOS endif endmenu diff --git a/bsp/phytium/libraries/drivers/drv_sdif.c b/bsp/phytium/libraries/drivers/drv_sdif.c index 1428bbcb4f2..6af00151486 100644 --- a/bsp/phytium/libraries/drivers/drv_sdif.c +++ b/bsp/phytium/libraries/drivers/drv_sdif.c @@ -8,6 +8,7 @@ * Change Logs: * Date Author Notes * 2023/7/11 liqiaozhong init SD card and mount file system + * 2023/11/8 zhugengyu add interrupt handling for dma waiting, unify function naming */ /***************************** Include Files *********************************/ @@ -15,20 +16,26 @@ #ifdef BSP_USING_SDIF #include +#include #include #include #include #include #ifdef RT_USING_SMART - #include "ioremap.h" +#include "ioremap.h" #endif #include "mm_aspace.h" +#include "interrupt.h" + +#define LOG_TAG "sdif_drv" +#include "drv_log.h" #include "ftypes.h" -#if defined(TARGET_E2000) - #include "fparameters.h" -#endif +#include "fparameters.h" +#include "fcpu_info.h" + +#include "fsdif_timing.h" #include "fsdif.h" #include "fsdif_hw.h" @@ -40,7 +47,6 @@ #elif defined (USING_SDIF1) #define SDIF_CONTROLLER_ID FSDIF1_ID #endif -#define SDIF_TF_CARD_HOST_ID 0x1 #define SDIF_MALLOC_CAP_DESC 256U #define SDIF_DMA_ALIGN 512U #define SDIF_DMA_BLK_SZ 512U @@ -50,16 +56,26 @@ #ifndef CONFIG_SDCARD_OFFSET #define CONFIG_SDCARD_OFFSET 0x0U #endif + +/* preserve pointer to host instance */ +static struct rt_mmcsd_host *mmc_host[FSDIF_NUM] = {RT_NULL}; /**************************** Type Definitions *******************************/ typedef struct { FSdif *mmcsd_instance; FSdifIDmaDesc *rw_desc; rt_err_t (*transfer)(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req, FSdifCmdData *cmd_data_p); -} mmcsd_info_t; + struct rt_event event; +#define SDIF_EVENT_CARD_DETECTED (1 << 0) +#define SDIF_EVENT_COMMAND_DONE (1 << 1) +#define SDIF_EVENT_DATA_DONE (1 << 2) +#define SDIF_EVENT_ERROR_OCCUR (1 << 3) +#define SDIF_EVENT_SDIO_IRQ (1 << 4) +} fsdif_info_t; /************************** Variable Definitions *****************************/ /***************** Macros (Inline Functions) Definitions *********************/ +void fsdif_change(void); /*******************************Api Functions*********************************/ static void fsdif_host_relax(void) @@ -67,9 +83,79 @@ static void fsdif_host_relax(void) rt_thread_mdelay(1); } +static void fsdif_card_detect_callback(FSdif *const mmcsd_instance, void *args, u32 status, u32 dmac_status) +{ + struct rt_mmcsd_host *host = (struct rt_mmcsd_host *)args; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + + rt_event_send(&private_data->event, SDIF_EVENT_CARD_DETECTED); + fsdif_change(); +} + +static void fsdif_command_done_callback(FSdif *const mmcsd_instance, void *args, u32 status, u32 dmac_status) +{ + struct rt_mmcsd_host *host = (struct rt_mmcsd_host *)args; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + + rt_event_send(&private_data->event, SDIF_EVENT_COMMAND_DONE); +} + +static void fsdif_data_done_callback(FSdif *const mmcsd_instance, void *args, u32 status, u32 dmac_status) +{ + struct rt_mmcsd_host *host = (struct rt_mmcsd_host *)args; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + + rt_event_send(&private_data->event, SDIF_EVENT_DATA_DONE); +} + +static void fsdif_sdio_irq_callback(FSdif *const mmcsd_instance, void *args, u32 status, u32 dmac_status) +{ + struct rt_mmcsd_host *host = (struct rt_mmcsd_host *)args; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + + rt_event_send(&private_data->event, SDIF_EVENT_SDIO_IRQ); +} + +static void fsdif_error_occur_callback(FSdif *const mmcsd_instance, void *args, u32 status, u32 dmac_status) +{ + struct rt_mmcsd_host *host = (struct rt_mmcsd_host *)args; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + + rt_event_send(&private_data->event, SDIF_EVENT_ERROR_OCCUR); +} + +static void fsdif_ctrl_setup_interrupt(struct rt_mmcsd_host *host) +{ + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + FSdif *mmcsd_instance = private_data->mmcsd_instance; + FSdifConfig *config_p = &mmcsd_instance->config; + rt_uint32_t cpu_id = 0; + + GetCpuId((u32 *)&cpu_id); + rt_hw_interrupt_set_target_cpus(config_p->irq_num, cpu_id); + rt_hw_interrupt_set_priority(config_p->irq_num, 0xd0); + + /* register intr callback */ + rt_hw_interrupt_install(config_p->irq_num, + FSdifInterruptHandler, + mmcsd_instance, + NULL); + + /* enable irq */ + rt_hw_interrupt_umask(config_p->irq_num); + + FSdifRegisterEvtHandler(mmcsd_instance, FSDIF_EVT_CARD_DETECTED, fsdif_card_detect_callback, host); + FSdifRegisterEvtHandler(mmcsd_instance, FSDIF_EVT_ERR_OCCURE, fsdif_error_occur_callback, host); + FSdifRegisterEvtHandler(mmcsd_instance, FSDIF_EVT_CMD_DONE, fsdif_command_done_callback, host); + FSdifRegisterEvtHandler(mmcsd_instance, FSDIF_EVT_DATA_DONE, fsdif_data_done_callback, host); + FSdifRegisterEvtHandler(mmcsd_instance, FSDIF_EVT_SDIO_IRQ, fsdif_sdio_irq_callback, host); + + return; +} + static rt_err_t fsdif_ctrl_init(struct rt_mmcsd_host *host) { - mmcsd_info_t *private_data_t = (mmcsd_info_t *)host->private_data; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; FSdif *mmcsd_instance = RT_NULL; const FSdifConfig *default_mmcsd_config = RT_NULL; FSdifConfig mmcsd_config; @@ -104,7 +190,7 @@ static rt_err_t fsdif_ctrl_init(struct rt_mmcsd_host *host) #else mmcsd_config.non_removable = FALSE; /* TF card is removable on board */ #endif - + mmcsd_config.get_tuning = FSdifGetTimingSetting; if (FSDIF_SUCCESS != FSdifCfgInitialize(mmcsd_instance, &mmcsd_config)) { @@ -121,18 +207,29 @@ static rt_err_t fsdif_ctrl_init(struct rt_mmcsd_host *host) FSdifRegisterRelaxHandler(mmcsd_instance, fsdif_host_relax); /* SDIF delay for a while */ - private_data_t->mmcsd_instance = mmcsd_instance; - private_data_t->rw_desc = rw_desc; + private_data->mmcsd_instance = mmcsd_instance; + private_data->rw_desc = rw_desc; - rt_kprintf("SDIF controller init success!\r\n"); + fsdif_ctrl_setup_interrupt(host); return RT_EOK; } -rt_inline rt_err_t Sdif_dma_transfer(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req, FSdifCmdData *req_cmd) +rt_inline rt_err_t fsdif_dma_transfer(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req, FSdifCmdData *req_cmd) { FError ret = FT_SUCCESS; - mmcsd_info_t *private_data_t = (mmcsd_info_t *)host->private_data; - FSdif *mmcsd_instance = private_data_t->mmcsd_instance; + rt_uint32_t event = 0U; + rt_uint32_t wait_event = 0U; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + FSdif *mmcsd_instance = private_data->mmcsd_instance; + + if (req_cmd->data_p == RT_NULL) + { + wait_event = SDIF_EVENT_COMMAND_DONE; + } + else + { + wait_event = SDIF_EVENT_COMMAND_DONE | SDIF_EVENT_DATA_DONE; + } ret = FSdifDMATransfer(mmcsd_instance, req_cmd); if (ret != FT_SUCCESS) @@ -141,11 +238,31 @@ rt_inline rt_err_t Sdif_dma_transfer(struct rt_mmcsd_host *host, struct rt_mmcsd return -RT_ERROR; } - ret = FSdifPollWaitDMAEnd(mmcsd_instance, req_cmd); - if (ret != FT_SUCCESS) + while (TRUE) { - LOG_E("FSdifPollWaitDMAEnd() fail."); - return -RT_ERROR; + if (rt_event_recv(&private_data->event, + (wait_event), + (RT_EVENT_FLAG_AND | RT_EVENT_FLAG_CLEAR | RT_WAITING_NO), + rt_tick_from_millisecond(5000), + &event) == RT_EOK) + { + (void)FSdifGetCmdResponse(mmcsd_instance, req_cmd); + break; + } + else + { + if (rt_event_recv(&private_data->event, + (SDIF_EVENT_ERROR_OCCUR), + (RT_EVENT_FLAG_CLEAR | RT_WAITING_NO), + rt_tick_from_millisecond(5000), + &event) == RT_EOK) + { + LOG_E("Sdif DMA transfer endup with error !!!"); + return -RT_EIO; + } + } + + fsdif_host_relax(); } if (resp_type(req->cmd) & RESP_MASK) @@ -166,7 +283,7 @@ rt_inline rt_err_t Sdif_dma_transfer(struct rt_mmcsd_host *host, struct rt_mmcsd return RT_EOK; } -static void mmc_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req) +static void fsdif_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req) { /* ignore some SDIF-ONIY cmd */ if ((req->cmd->cmd_code == SD_IO_SEND_OP_COND) || (req->cmd->cmd_code == SD_IO_RW_DIRECT)) @@ -175,7 +292,7 @@ static void mmc_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *re goto skip_cmd; } - mmcsd_info_t *private_data_t = (mmcsd_info_t *)host->private_data; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; FSdifCmdData req_cmd; FSdifCmdData req_stop; FSdifData req_data; @@ -257,7 +374,7 @@ static void mmc_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *re req_cmd.cmdarg = req->cmd->arg; /* do cmd and data transfer */ - req->cmd->err = (private_data_t->transfer)(host, req, &req_cmd); + req->cmd->err = (private_data->transfer)(host, req, &req_cmd); if (req->cmd->err != RT_EOK) { LOG_E("transfer failed in %s", __func__); @@ -284,7 +401,7 @@ static void mmc_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *re req_stop.flag |= FSDIF_CMD_FLAG_EXP_LONG_RESP; } } - req->stop->err = (private_data_t->transfer)(host, req, &req_stop); + req->stop->err = (private_data->transfer)(host, req, &req_stop); } if (data_buf_aligned) @@ -296,11 +413,11 @@ static void mmc_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *re mmcsd_req_complete(host); } -static void mmc_set_iocfg(struct rt_mmcsd_host *host, struct rt_mmcsd_io_cfg *io_cfg) +static void fsdif_set_iocfg(struct rt_mmcsd_host *host, struct rt_mmcsd_io_cfg *io_cfg) { FError ret = FT_SUCCESS; - mmcsd_info_t *private_data_t = (mmcsd_info_t *)host->private_data; - FSdif *mmcsd_instance = private_data_t->mmcsd_instance; + fsdif_info_t *private_data = (fsdif_info_t *)host->private_data; + FSdif *mmcsd_instance = private_data->mmcsd_instance; uintptr base_addr = mmcsd_instance->config.base_addr; if (0 != io_cfg->clock) @@ -331,18 +448,24 @@ static void mmc_set_iocfg(struct rt_mmcsd_host *host, struct rt_mmcsd_io_cfg *io static const struct rt_mmcsd_host_ops ops = { - mmc_request_send, - mmc_set_iocfg, + fsdif_request_send, + fsdif_set_iocfg, RT_NULL, RT_NULL, RT_NULL, }; -int ft_mmcsd_init(void) +void fsdif_change(void) +{ + mmcsd_change(mmc_host[SDIF_CONTROLLER_ID]); +} + +int rt_hw_fsdif_init(void) { /* variables init */ struct rt_mmcsd_host *host = RT_NULL; - mmcsd_info_t *private_data = RT_NULL; + fsdif_info_t *private_data = RT_NULL; + rt_err_t result = RT_EOK; host = mmcsd_alloc_host(); if (!host) @@ -351,15 +474,17 @@ int ft_mmcsd_init(void) goto err_free; } - private_data = rt_malloc(sizeof(mmcsd_info_t)); + private_data = rt_malloc(sizeof(fsdif_info_t)); if (!private_data) { LOG_E("Malloc private_data failed"); goto err_free; } - rt_memset(private_data, 0, sizeof(mmcsd_info_t)); - private_data->transfer = Sdif_dma_transfer; + rt_memset(private_data, 0, sizeof(fsdif_info_t)); + private_data->transfer = fsdif_dma_transfer; + result = rt_event_init(&private_data->event, "sdif_event", RT_IPC_FLAG_FIFO); + RT_ASSERT(RT_EOK == result); /* host data init */ host->ops = &ops; @@ -373,14 +498,14 @@ int ft_mmcsd_init(void) host->max_blk_count = SDIF_MAX_BLK_TRANS; host->private_data = private_data; + mmc_host[SDIF_CONTROLLER_ID] = host; + if (RT_EOK != fsdif_ctrl_init(host)) { LOG_E("fsdif_ctrl_init() failed"); goto err_free; } - mmcsd_change(host); - return RT_EOK; err_free: @@ -403,5 +528,5 @@ int ft_mmcsd_init(void) return -RT_EOK; } -INIT_DEVICE_EXPORT(ft_mmcsd_init); -#endif // #ifdef RT_USING_SDIF \ No newline at end of file +INIT_DEVICE_EXPORT(rt_hw_fsdif_init) +#endif // #ifdef RT_USING_SDIO \ No newline at end of file diff --git a/bsp/phytium/libraries/port/fboard_port/fboard_port.h b/bsp/phytium/libraries/port/fboard_port/fboard_port.h index 44cfae655b6..9f004599334 100644 --- a/bsp/phytium/libraries/port/fboard_port/fboard_port.h +++ b/bsp/phytium/libraries/port/fboard_port/fboard_port.h @@ -24,6 +24,7 @@ #ifndef FBOARD_PORT_H #define FBOARD_PORT_H +#include #include #include "rtconfig.h" diff --git a/bsp/phytium/libraries/port/fdriver_port/fdrivers_port.h b/bsp/phytium/libraries/port/fdriver_port/fdrivers_port.h index 3326031225b..5b6f0d77aa9 100644 --- a/bsp/phytium/libraries/port/fdriver_port/fdrivers_port.h +++ b/bsp/phytium/libraries/port/fdriver_port/fdrivers_port.h @@ -25,6 +25,14 @@ #ifndef FDRIVERS_PORT_H #define FDRIVERS_PORT_H +#include "ftypes.h" +#ifdef __aarch64__ +#include "faarch64.h" +#else +#include "faarch32.h" +#endif +#include +#include /***************************** Include Files *********************************/ #include "rtconfig.h" #include "ftypes.h" diff --git a/bsp/phytium/libraries/standalone/board/e2000d_demo/fsdif_timing.c b/bsp/phytium/libraries/standalone/board/e2000d_demo/fsdif_timing.c index ff13474950f..694ae31fb36 100644 --- a/bsp/phytium/libraries/standalone/board/e2000d_demo/fsdif_timing.c +++ b/bsp/phytium/libraries/standalone/board/e2000d_demo/fsdif_timing.c @@ -154,7 +154,9 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r case FSDIF_CLK_SPEED_52_MHZ: tuning = &mmc_52mhz; break; - /* TODO: more clock freq for tuning */ + /* TODO: more clock freq for tuning */ + default: + break; } } else @@ -171,7 +173,9 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r case FSDIF_CLK_SPEED_100_MHZ: tuning = &sd_100mhz; break; - /* TODO: more clock freq for tuning */ + /* TODO: more clock freq for tuning */ + default: + break; } } diff --git a/bsp/phytium/libraries/standalone/board/e2000q_demo/fsdif_timing.c b/bsp/phytium/libraries/standalone/board/e2000q_demo/fsdif_timing.c index b9d3c7839f6..61c48532bff 100644 --- a/bsp/phytium/libraries/standalone/board/e2000q_demo/fsdif_timing.c +++ b/bsp/phytium/libraries/standalone/board/e2000q_demo/fsdif_timing.c @@ -153,7 +153,9 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r case FSDIF_CLK_SPEED_52_MHZ: tuning = &mmc_52mhz; break; - /* TODO: more clock freq for tuning */ + /* TODO: more clock freq for tuning */ + default: + break; } } else @@ -170,7 +172,9 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r case FSDIF_CLK_SPEED_100_MHZ: tuning = &sd_100mhz; break; - /* TODO: more clock freq for tuning */ + /* TODO: more clock freq for tuning */ + default: + break; } } diff --git a/bsp/phytium/libraries/standalone/board/firefly/fsdif_timing.c b/bsp/phytium/libraries/standalone/board/firefly/fsdif_timing.c index e49119b5cd8..4f8b30a2d4c 100644 --- a/bsp/phytium/libraries/standalone/board/firefly/fsdif_timing.c +++ b/bsp/phytium/libraries/standalone/board/firefly/fsdif_timing.c @@ -153,7 +153,9 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r case FSDIF_CLK_SPEED_52_MHZ: tuning = &mmc_52mhz; break; - /* TODO: more clock freq for tuning */ + /* TODO: more clock freq for tuning */ + default: + break; } } else @@ -170,7 +172,9 @@ const FSdifTiming *FSdifGetTimingSetting(FSdifClkSpeed clock_freq, boolean non_r case FSDIF_CLK_SPEED_100_MHZ: tuning = &sd_100mhz; break; - /* TODO: more clock freq for tuning */ + /* TODO: more clock freq for tuning */ + default: + break; } } diff --git a/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.c b/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.c index de72b2eb414..5ffa2e1a668 100644 --- a/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.c +++ b/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.c @@ -298,9 +298,8 @@ FError FSdifResetCtrl(uintptr base_addr, u32 reset_bits) do { reg_val = FSDIF_READ_REG(base_addr, FSDIF_STATUS_OFFSET); - } - while (!FSDIF_STATUS_FIFO_EMPTY & reg_val); - + } while (!(FSDIF_STATUS_FIFO_EMPTY & reg_val)); + if (retries <= 0) { FSDIF_ERROR("Fifo not empty !!!"); diff --git a/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.h b/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.h index 8bbb37c4bac..50665da7082 100644 --- a/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.h +++ b/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif.h @@ -158,7 +158,7 @@ typedef struct volatile boolean success; /* TRUE: comand and data transfer success */ } FSdifCmdData; /* SDIF trans command and data */ -typedef const FSdifTiming *(*FSdifGetTuning)(FSdifClkSpeed clock_freq, u32 non_removable); +typedef const FSdifTiming *(*FSdifGetTuning)(FSdifClkSpeed clock_freq, boolean non_removable); typedef struct _FSdifTiming { diff --git a/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif_dma.c b/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif_dma.c index f68b6e18d97..de9107e1a76 100644 --- a/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif_dma.c +++ b/bsp/phytium/libraries/standalone/drivers/mmc/fsdif/fsdif_dma.c @@ -379,7 +379,6 @@ FError FSdifSetIDMAList(FSdif *const instance_p, volatile FSdifIDmaDesc *desc, u { FASSERT(instance_p); FError ret = FSDIF_SUCCESS; - uintptr base_addr = instance_p->config.base_addr; if (FT_COMPONENT_IS_READY != instance_p->is_ready) {