您现在的位置是:澳门市大堂区 >>正文
在人世|他们在从事一项很新的作业
澳门市大堂区12684人已围观
简介他们将自己对术式的了解、人从作业心得体会与广阔线上线下的同路们共享评论,会中还有许多全国大咖的精彩点评,演示中评论火热,学术气氛稠密。...
他们将自己对术式的了解、人从作业心得体会与广阔线上线下的同路们共享评论,会中还有许多全国大咖的精彩点评,演示中评论火热,学术气氛稠密。
别的咱们在.\rt-thread\bsp\lpc55sxx\lpc55s69_nxp_evk\board\ports\下新建fal_sample.c文件,世|事并编写测验代码:世|事//fal_sample.c/**Copyright(c)2006-2023,RT-ThreadDevelopmentTeam**SPDX-License-Identifier:Apache-2.0**ChangeLogs:*DateAuthorNotes*2023-04-21Wangyuqiangthefirstversion*/#includertthread.h#includertdevice.h#includeboard.h#includefal.h#defineBUF_SIZE1024staticintfal_test(constchar*partiton_name){intret;inti,j,len;uint8_tbuf[BUF_SIZE];conststructfal_flash_dev*flash_dev=RT_NULL;conststructfal_partition*partition=RT_NULL;if(!partiton_name){rt_kprintf(Inputparampartitionnameisnull!\n);return-1;}partition=fal_partition_find(partiton_name);if(partition==RT_NULL){rt_kprintf(Findpartition(%s)failed!\n,partiton_name);ret=-1;returnret;}flash_dev=fal_flash_device_find(partition->flash_name);if(flash_dev==RT_NULL){rt_kprintf(Findflashdevice(%s)failed!\n,partition->flash_name);ret=-1;returnret;}rt_kprintf(Flashdevice:%sFlashsize:%dK\nPartition:%sPartitionsize:%dK\n,partition->flash_name,flash_dev->len/1024,partition->name,partition->len/1024);/*eraseallpartition*/ret=fal_partition_erase_all(partition);if(ret。=0){if(write(fd,str,sizeof(str))==sizeof(str))rt_kprintf(Writedatadone.\n);close(fd);}/*Openfileinread-onlymode*/fd=open(/user/test.txt,O_RDONLY);if(fd>=0){size=read(fd,buf,sizeof(buf));close(fd);if(size==sizeof(str))rt_kprintf(Readdatafromfiletest.txt(size:%d):%s\n,size,buf);}}MSH_CMD_EXPORT_ALIAS(fal_elmfat_sample,fal_elmfat,falelmfatsample);2.5测验成果测验成果如下:项新3.Easyflash移植到FAL分区3.1简述EasyFlash关于EasyFlash的来历咱们现已讲过了,项新此处不再赘述。
装备后退出ENV,人从作业一起运用pkgs--update下载软件包,人从作业然后再运用scons--target=mdk5从头生成MDK5文件3.3移植easyflash下载完easyflash软件包后,咱们仿制.\rt-thread\bsp\lpc55sxx\lpc55s69_nxp_evk\packages\EasyFlash-latest\ports\ef_fal_port.c到目录.\rt-thread\bsp\lpc55sxx\lpc55s69_nxp_evk\board\ports\easyflash\ef_fal_port.c,双击翻开该文件,完结以下修正://修正FAL_EF_PART_NAME为easyflash#defineFAL_EF_PART_NAMEeasyflash//修正环境变量内容为{boot_times,0},这儿咱们先只设置一个开机次数staticconstef_envdefault_env_set[]={{boot_times,0},};3.4编写Easyflash测验用例/**Copyright(c)2006-2023,RT-ThreadDevelopmentTeam**SPDX-License-Identifier:Apache-2.0**ChangeLogs:*DateAuthorNotes*2023-04-21Wangyuqiangthefirstversion*/#includertthread.h#includertdevice.h#includeboard.h#includefal.h#include#includeeasyflash.h#include#defineFS_PARTITION_NAMEfilesystem#defineBUF_SIZE1024staticintfal_test(constchar*partiton_name){intret;inti,j,len;uint8_tbuf[BUF_SIZE];conststructfal_flash_dev*flash_dev=RT_NULL;conststructfal_partition*partition=RT_NULL;if(!partiton_name){rt_kprintf(Inputparampartitionnameisnull!\n);return-1;}partition=fal_partition_find(partiton_name);if(partition==RT_NULL){rt_kprintf(Findpartition(%s)failed!\n,partiton_name);ret=-1;returnret;}flash_dev=fal_flash_device_find(partition->flash_name);if(flash_dev==RT_NULL){rt_kprintf(Findflashdevice(%s)failed!\n,partition->flash_name);ret=-1;returnret;}rt_kprintf(Flashdevice:%sFlashsize:%dK\nPartition:%sPartitionsize:%dK\n,partition->flash_name,flash_dev->len/1024,partition->name,partition->len/1024);/*eraseallpartition*/ret=fal_partition_erase_all(partition);if(ret。1.FAL组件1.1什么是FALFAL(FlashAbstractionLayer)Flash笼统层,世|事是对Flash及依据Flash的分区进行办理、世|事操作的笼统层,对上层一致了Flash及分区操作的API(结构图如下所示),并具有以下特性:支撑静态可装备的分区表,并可相关多个Flash设备;分区表支撑主动装载。此刻咱们回到ENV主界面,项新进入RT-ThreadComponents->DeviceDrivers->UsingSerialFlashUniversalDriver,项新此刻咱们才可以看到SFUD选项呈现(假如没有使能spi是无法看到的),使能后坚持默许即可到这儿,ENV的装备暂时告一段落。
EasyFlash是一款开源的轻量级嵌入式Flash存储器库,人从作业便利开发者愈加轻松的完结依据Flash存储器的常见运用开发。2.3运用ENV装备DFS翻开ENV,世|事进入途径RT-ThreadComponents→DFS:devicevirtualfilesystem,世|事使能[*]DFS:devicevirtualfilesystem因为DFS运用的是POSIX接口,而dfs_posix.h现已在新版别中被移除了,假如想要兼容老版别,可以在menuconfig中使能RT-ThreadComponents->[*]Supportlegacyversionforcompatibility因为elmfat文件体系默许最大扇区巨细为512,但咱们运用的flash模块W25Q128的Flash扇区巨细为4096,为了将elmfat文件体系挂载到W25Q128上,这儿的Maximumsectorsize需求和W25Q128扇区巨细坚持一致,修正为4096,途径:RT-ThreadComponents→DFS:devicevirtualfilesystem→[*]Enableelm-chanfatfs/elm-chansFatFs,GenericFATFilesystemModule保存退出后运用scons--target=mdk5生成MDK5工程。
项新len;){rt_memset(buf,0x00,BUF_SIZE);len=(partition->len-i)>BUF_SIZE?BUF_SIZE:(partition->len-i);ret=fal_partition_write(partition,i,buf,len);if(ret。
人从作业name);ret=-1;returnret;}rt_kprintf(Erase(%s)partitionfinish!\n,partiton_name);/*readthespecifiedpartitionandcheckdata*/for(i=0;i。2023年1月,世|事小马智行官宣针对乘用车智能驾驭事务树立独立事业部,名为PersonallyOwnedVehicles(简称POV)。
楼天城停顿了一下说:项新咱们最大的福利,是给这个人和其他十分牛逼的人一同作业的时机。激光雷达的项目规划很小,人从作业证明之后发现不太行得通而作罢,小马内部少有人知道。
小马智行北京地区担任人李房屋担任小马智卡总担任人,世|事潘震皓担任技能担任人。在商务协作层面,项新小马是一群天才的乌托邦,自带一股傲气与固执,这与智驾计划商的稠密江湖气有点不搭。
Tags:
相关文章
十四届全国人大三次会议有3场记者会
澳门市大堂区这款新式AI设备据称遭到初代iPhone的启示,旨在供给一种比现代智能手机更为调和、不那么打乱交际体会的运用感触。...
【澳门市大堂区】
阅读更多乘客称投诉司机吸烟被回复“核对录音未发现”,曹操
澳门市大堂区司机显得有些严重,他解说说这是一辆远程运输车,因为时刻急迫,他没有来得及仔细检查车辆就匆忙上路了。...
【澳门市大堂区】
阅读更多日本疆土交通省:为扩展女飞翔员报考及接收份额
澳门市大堂区事实上,为了抢夺毛孩子,铲屎官们确实采取了不同举动,有的私自搬运宠物,有的请律师出头说话,还有的不吝对簿公堂。...
【澳门市大堂区】
阅读更多