Open JustaCatPerson opened 7 months ago
Hi, I don't have an R4 to test it myself, but I think it's likely OSFS should continue to work fine: it doesn't rely on avr specific details. Please let me know how it goes!
Hi Charles, thanks for the reply. I'll do some testing next week and see how I go. My initial concern was that standard C/C++ data types like int are 4 bytes on the newer R4 family device and what effect that would have on data structures etc. I note that your code does actually specify data types with width (e.g. uint16_t), so maybe no problems at all?
Hi Charles, I've conducted a few tests using Arduino IDE 2.3.2 on a UNO R4 WiFi... Results are:
1) Compiler respects your type sizes, i.e. sizeof(uint16_t) is 2 while sizeof(int) is 4.
2) Your example "writeTest" compiles and runs ok.
3) Your example "readTest" required minor change in the first readNBytes (line 79) with a type cast of (byte) to the character array to avoid: Compilation error: invalid conversion from 'char' to 'byte {aka unsigned char}' [-fpermissive]. Line now reads: OSFS::readNBytes(filePtr, fileSize, (byte*)testStr);
4) In summary, looks fine on the R4 Arduino. As a further test/confirm, I'll update a project of mine that will require the storage of multiple integers (device config settings) and a couple of larger files of a few hundred bytes that are used to store and system status/logs while the device is powered down.
OSFS is a great little file system for embedded devices. I've just tried using it on an Arduino UNO R4 and I'm getting the following compiler warning from the Arduino IDE:
"WARNING: library OSFS claims to run on avr architecture(s) and may be incompatible with your current board which runs on renesas_uno architecture(s)."
Should I be concerned to use as is? Possibly an update is needed?
Great library, thanks for the work.