>-----Original Message----- >From: Arie de Muijnck <nu...@ademu.com> >Sent: 19 January 2022 22:34 >> FAT seems broken for NOR flash devices. Spent days getting nowhere. >> >> Since FAT and flash devices don't really play well together anyway >> (already found s512 erases a flash sector at least 4 times when >> writing a cluster), so I'm wondering, in parallel, if NuttX has other >> tricks up its sleeve that might achieve the same end? I want t: >> >> - write to the flash, for logging, from the app running on the board. >> This can be done with any FS - or raw - as far as I'm concerned. Not >> the issue. >> >> - an external PC (ideally Linux, Windows and MAC) needs to be able >> "see" the data via USB (msd) and read/write to the memory (log data, >> config files, audio files, etc). Hence FAT. >> >> With a flash size of between 32 and 128Mbyte, I don't think a ramdisk >> formatted as FAT holding a copy of the flash data is really the way to >> go (board only has 64Mbyte RAM anyway). >> >> I'm guessing I'll have to keep up the battle - that NuttX is winning - >> of FAT vs. NOR flash until the bitter end, but if anyone does have >> other ideas I'm listening! >> > >Why the fixation for MSD mode and FAT? >Using a serial stream protocol also could access the files in a transparent >matter. >I remember the days of KERMIT, ZMODEM, CP, etc., over a serial link. >Making the device appear as an NDIS network adapter also allows e.g. FTP to >transfer files. > >Arie
Reasonable question, and my thinking may be flawed - a little knowledge is a dangerous thing! In the past I have developed products with USB that then needed a dedicated PC app to be developed to transfer data and/or configure it. I wish to ensure that this device can be configured by any computing device (Windows, Linux, MAC) and USB+MSD seemed the lowest common denominator without the need to develop a cross-platform app. Ultimately I will need an Android/iOS app and Bluetooth LE connectivity but that's in the future. "Configuration" would be via files in industry standard format (e.g. CAN dbc files, or .wav files with "known" names - such as "startup.wav") or that can be readily created in a text editor or downloaded from our website (e.g. xml files or even a .ini type file). USB+MSD would allow these to be simply copied across to the embedded device. And FAT is what I understand to be the most portable FS. Likewise log files (up to 64Mbyte) would be in an industry-standard format allowing 3rd party viewers to be used (again, no need for a custom app) and USB+MSD+FAT seemed the best way to transfer these. RNDIS/USB or whatever is actually a very interesting idea though so I will look at that. I'm open to all suggestion and I'm listening :)