Re: SPI EEPROM, losetup, LittleFS

2023-12-15 Thread Xiang Xiao
On Fri, Dec 15, 2023 at 5:17 PM Sebastien Lorquet wrote: > Hi, > > I dont think you can use losetup to create a mtd device. loop devices > are regular block devices. You can use lomtd to setup a mtd device loop: https://github.com/apache/nuttx-apps/blob/master/nshlib/nsh_fscmds.c#L1144-L1306

debugassert vs assert in apps

2023-12-15 Thread Alan C. Assis
I think debugassert() is for finding BUGs during the development/testing phase. In the other hand assert() should be put in case where something really catastrofic is going to happen and cannot be avoid anyway. My personal opinion is that release code shouldn't have (or should have the minimum as

Re: SPI EEPROM, losetup, LittleFS

2023-12-15 Thread Alan C. Assis
Hi Tim, What is the P/N# of your SPI EEPROM? As Sébastien said the best option is adding support to your SPI EEPROM as MTD. I used char dev EEPROM in the past with a circular packet buffer. It was used to store tracking data before sending it to the cloud. It was faster than using MTD in the dev

Re: SPI EEPROM, losetup, LittleFS

2023-12-15 Thread Sebastien Lorquet
Hi, I dont think you can use losetup to create a mtd device. loop devices are regular block devices. This will only work if littlefs can mount a block device (no idea if thats possible) what you need is an adaptation layer that will implement a mtd device on an eeprom. You can duplicate a