fix for art-pi smart

This commit is contained in:
xiao-mang 2024-04-19 14:48:17 +08:00 committed by Rbb666
parent 84e6b3c393
commit 98204c249b
3 changed files with 32 additions and 40 deletions

View File

@ -6,33 +6,35 @@ 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启动内核、挂载文件系统
## 应用编译
@ -81,13 +83,3 @@ go 0x80001000
```bash
fatload mmc 0:1 0x80001000 rtthread.bin; dcache flush; go 0x80001000
```
## 待改进
* 支持ash开机自启动
* 以太网网络问题
* Emmc1、2、3 mkfs失败
* 从emmc启动内核

View File

@ -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)

View File

@ -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;