分区表为:
"spi-nand": { // Device, The name should be the same with string in image:info:media:type
"size": "128m", // Size of SPI NAND
"partitions": {
"spl": { "size": "1m" },
"env": { "size": "256k" },
"env_r": { "size": "256k" },
"os": { "size": "8m" },
"rodata": { "size": "16m" },
"data": { "size": "16m" }
}
}
将data分区选择为littlefs格式在烧录时会出现以下错误:
Firmware Component:
name: image.target.data
partition: data
attr: mtd;optional
Media: SPI_NAND(2)
[E] mtd_spinand_block_isbad()124 Offset: 0x1000000 is out of mtd size: 0x1000000.
[E] nand_fwc_mtd_write()348 Write block is bad, skip it.
[E] nand_fwc_mtd_write()320 Not enough space to write mtd data
并且RTOS内mount失败。
将data分区选择为uffs格式在编译时会出现以下编译错误:
page_2k_block_128k_oob_64_data.fs file_size: 0x1080000 is over much than part_size: 0x1000000
scons: *** [output/d21x_d213ecv-demo-v4_rt-thread_helloworld/images/d21x.elf] Error 1
data分区只有在格式为fat32时才能成功挂载,此格式在意外关机时容易出现错误,不能用于商用环境中的可读写的文件系统。
最近编辑记录 海石生风 (昨天 13:54:03)
离线
我确认下
离线
Nandflash 里面,data 分区我们默认是fatfs 文件系统格式
离线
data 分区是可读写的
离线
实际上不推荐使用uffs ,因为这个格式每个文件只要占用一个block ,小文件多了的话资源利用率不是很好
离线
Fatfs data 分区是支持读写的,需要一个nftl 做中间层,配置那里不要用自动计算
离线
将data分区选择为uffs格式在编译时会出现以下编译错误
是因为分区太小。你可以改大试试
离线