Closed jviotti closed 9 years ago
Hmm, I don't see anything wrong offhand. The examples I have currently are:
You might try tweaking my card_debug.js script, which is currently configured to use a raw sdcard interface but might help you dump relevant partition info to double-check offsets (and content at each offset).
@natevw Thanks for the examples. Turned out to be an issue with the image file I was trying to read from. My snippet worked with another image!
Thanks for the support, and sorry for the trouble!
I'm looking forward to read from a FAT partition which happens to be the fifth partition of an *.img file, however I'm a little bit confused in how should I build the driver to interact with that specific partition of the file.
I'm generating the driver like this:
I'm then opening the
*.img
file withfs.open()
, passing the file descriptor, and the offset (the beginning of the partition in the image file) and size of the partition, which happens to be (this matchesfdisk
):However I get the following error when calling
fatfs.createFileSystem()
:I'm sure this is an error with my code rather than with fatfs, but I wonder if you could showcase a driver translating the positions as you suggest on the README.