Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Tomek CEDRO
Yup thats what I mentioned before :-) On OS there are mount options that may improve efficiency and storage lifetime like noatime (no access time update), nomtime (no modify time update).. not sure if these are available on NuttX but may be worth considering :-) Tomek On Fri, Nov 1, 2024 at 4:12 

Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Xiang Xiao
it's ok to use fatfs on flas in this particular case. On Sat, Nov 2, 2024 at 12:43 AM Tim Hardisty wrote: > I will only be making a few 100 changes over the life of the product. It’s > a holding area for a new firmware image to be written via USBMSD by the > user and used by MCUboot to write out

Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Tim Hardisty
I will only be making a few 100 changes over the life of the product. It’s a holding area for a new firmware image to be written via USBMSD by the user and used by MCUboot to write out (raw) to the main boot flash. Ideally I would like a “FAT translator” that allows (say) a LittleFS partition to

Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Xiang Xiao
it mayn't work as you expect. FatFS updates some fixed location very frequently, your flash device may stop working after you make ten thousand changes. On Fri, Nov 1, 2024 at 8:06 PM Tim hardisty wrote: > I am successfully creating a FAT FS on a QSPI NOR flash - the problem > was an error in th

Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Tim hardisty
I am successfully creating a FAT FS on a QSPI NOR flash - the problem was an error in the flash driver when 512 byte sector emulation was being used. I do this in my bringup code: struct qspi_dev_s *qspi_flashmem; qspi_flashmem = sam_qspi_initialize(0); ... mtd_qspi = gd55_initialize(qspi_flash

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Xiang Xiao
On Wed, Oct 30, 2024 at 2:00 AM Tim Hardisty wrote: > Whilst FAT on a NOR flash may generally be seen a not such a great > idea...please ignore that and confirm if... > > ...I am right in deducing that I can't simply make a FAT file system on > (say) the third mtd partition (with 512 byte sector

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Nathan Hartman
On Thu, Oct 31, 2024 at 2:51 PM Alan C. Assis wrote: > Hi Tim, > > It would be nice if you can write down the steps you took, if you have a > blog to document it. Or put it directly in NuttX's Documentation. It will be helpful for others! Maybe a document about "How To Use File Systems" with

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Tim Hardisty
But it’s not really a guide on a specific topic (such as creating a custom board). It’s a collection of things that achieve a specific set of functionalities for a unique purpose, from which others might get inspiration or clues to help them? > On 31 Oct 2024, at 20:25, Alan C. Assis wrote: >

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Alan C. Assis
You can put it here: https://nuttx.apache.org/docs/latest/guides/index.html On Thu, Oct 31, 2024 at 4:57 PM Tim Hardisty wrote: > Is there a documentation section that might be good for mini case-studies? > I can imagine this being a place for a “mini-blog” that are happy to share > but don’t h

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Tim Hardisty
Is there a documentation section that might be good for mini case-studies? I can imagine this being a place for a “mini-blog” that are happy to share but don’t have our own blog? Perhaps 100’s of personal blogs is not a good place for information: it should be in one place I think?) > On 31 Oct

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Alan C. Assis
Hi Nathan, True! And using Flash + Partitions + different FS + MCUBoot + USB MSC is something that could help other people to implement their solution. BR, Alan On Thu, Oct 31, 2024 at 4:36 PM Nathan Hartman wrote: > On Thu, Oct 31, 2024 at 2:51 PM Alan C. Assis wrote: > > > Hi Tim, > > > >

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Tim Hardisty
Totally happy to add to documentation and/or guides. Once I have what I’m doing working I can post here again with a summary of what I did - and why - and seek suggestions on what would be a guide and what would be better in documentation. It also looks like the s512_initialize function is depre

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Tim Hardisty
Alan - the reasoning was explained earlier in this conversation, but I will summarize once I have it 100% working with multiple partitions, USBMSD, MCUboot etc. As an aside I will take a look at other QSPI drivers as they may have the same problem as I found with the write status flag (not surp

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Alan C. Assis
Hi Tim, It would be nice if you can write down the steps you took, if you have a blog to document it. Why do you need a partition with LittleFS and another with FAT with USB Mass Storage? Do you want to copy the file from computer to board to firmware update or just to copy logs and other files

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Tim Hardisty
I have got this working - the only problem I had was a bug in the QSPI NOR flash driver (GigaDevice GD55 series) I am writing in parallel to allow for what I want. I missed something in the datasheet whereby if you send >256 bytes in a single write sequence, it will overwrite the first 256 byt

Re: FAT FS on mtd partition of NOR flash

2024-10-30 Thread Tomek CEDRO
Ugh, mobiles, sorry :-) I meant whole disk at some offset of memory.. and by disk I mean just the "partition" (or whatever you name it) you want to use as the filesystem storage not necessarily the whole disk with partitions (not sure why you want to use partitions) :-) I do not know the details b

Re: FAT FS on mtd partition of NOR flash

2024-10-30 Thread Tomek CEDRO
how about creating a while disk at memory offset? :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info On Wed, Oct 30, 2024, 11:58 Tim Hardisty wrote: > Thanks for taking the time to reply. My thinking is undoubtedly flawed - I > think I assumed that carving up a 128Mbyte QSPI NOR flash into a n

Re: FAT FS on mtd partition of NOR flash

2024-10-30 Thread Tim Hardisty
A typo maybe? What do you mean by a “while” disk, please? > On 30 Oct 2024, at 18:33, Tomek CEDRO wrote: > > how about creating a while disk at memory offset? :-) > > -- > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info > > On Wed, Oct 30, 2024, 11:58 Tim Hardisty wrote: > >> Thanks for taking

Re: FAT FS on mtd partition of NOR flash

2024-10-30 Thread Tim Hardisty
Thanks for taking the time to reply. My thinking is undoubtedly flawed - I think I assumed that carving up a 128Mbyte QSPI NOR flash into a number of partitions would allow each registered device partition to behave independently so I could do with them what I wanted. For example: /dev/qspi0 -

Re: FAT FS on mtd partition of NOR flash

2024-10-29 Thread Tomek CEDRO
That depends on what partition schema do you use. If MBR then first 512 bytes are the partition table and the boot code (like on PC), there is a limit of 4 partitions (that on PC was solved by makind "extended partition" and then first 512 bytes of that partition enabled another partitions). GPT fo