From 98204c249b45d470975fd790a3068da9fcd912eb Mon Sep 17 00:00:00 2001 From: xiao-mang Date: Fri, 19 Apr 2024 14:48:17 +0800 Subject: [PATCH] fix for art-pi smart --- bsp/nxp/imx/imx6ull-smart/README.md | 68 ++++++++++------------- components/dfs/dfs_v2/src/dfs_file_mmap.c | 2 +- components/dfs/dfs_v2/src/dfs_pcache.c | 2 +- 3 files changed, 32 insertions(+), 40 deletions(-) diff --git a/bsp/nxp/imx/imx6ull-smart/README.md b/bsp/nxp/imx/imx6ull-smart/README.md index 2e76aed277..29cfc83225 100644 --- a/bsp/nxp/imx/imx6ull-smart/README.md +++ b/bsp/nxp/imx/imx6ull-smart/README.md @@ -6,34 +6,36 @@ ART-pi smart采用了米尔科技的imx6ull核心板,硬件由韦东山团队 ![硬件资源](figures/hw_resources.png) -## 应用列表 - --[x] cpp_tc - --[x] hello - --[x] zlib_tc - --[x] smart-fetch - --[x] umailbox - --[x] busybox命令(可通过help查看) - --[x] WIFI - --[x] EMMC读写 - -下列应用支持ash后才可以使用 - --[ ] shm_ping - --[ ]shm_pong - --[ ]webclient - --[ ]webserver - +> ## 当前支持情况 +> ### 内核 +> * [ ] rt-thread +> * [x] rt-smart +> +> ### 驱动 +> * [x] uart +> * [x] SPI +> * [x] GPIO +> * [x] sdcard +> * [x] RW007 +> * [x] enet +> * [ ] usb +> * [x] emmc +> +> ### 组件 +> * [x] fat文件系统 +> * [x] LWIP网络协议栈 +> * [x] wlan +> +> ### 应用 +> * [x] xmake 构建环境 +> * [x] busybox +> * [x] smart-apps +> +> ### 待完善、修复 +> * [ ] ash 支持ash开机自启动 +> * [ ] 网络 以太网网络问题修复 +> * [ ] emmc 从emmc启动内核、挂载文件系统 + ## 应用编译 参考https://github.com/RT-Thread/userapps.git的README.md搭建xmake编译环境并编译smart应用 @@ -81,13 +83,3 @@ go 0x80001000 ```bash fatload mmc 0:1 0x80001000 rtthread.bin; dcache flush; go 0x80001000 ``` - -## 待改进 - -* 支持ash开机自启动 - -* 以太网网络问题 - -* Emmc1、2、3 mkfs失败 - -* 从emmc启动内核 \ No newline at end of file diff --git a/components/dfs/dfs_v2/src/dfs_file_mmap.c b/components/dfs/dfs_v2/src/dfs_file_mmap.c index b976a85a27..430839112a 100644 --- a/components/dfs/dfs_v2/src/dfs_file_mmap.c +++ b/components/dfs/dfs_v2/src/dfs_file_mmap.c @@ -184,7 +184,7 @@ void page_read(struct rt_varea *varea, struct rt_aspace_io_msg *msg) varea->start, varea->size, varea->offset, varea->attr, varea->flag); ret = dfs_aspace_mmap_read(file, varea, msg); - if (ret >= 0) + if (ret > 0) { msg->response.status = MM_FAULT_STATUS_OK; if (ret < ARCH_PAGE_SIZE) diff --git a/components/dfs/dfs_v2/src/dfs_pcache.c b/components/dfs/dfs_v2/src/dfs_pcache.c index 350ad1f061..57f4510e93 100644 --- a/components/dfs/dfs_v2/src/dfs_pcache.c +++ b/components/dfs/dfs_v2/src/dfs_pcache.c @@ -1105,7 +1105,7 @@ int dfs_aspace_read(struct dfs_file *file, void *buf, size_t count, off_t *pos) } len = count > len ? len : count; - if (len > 0) + if (len) { rt_memcpy(ptr, page->page + *pos - page->fpos, len); ptr += len;