-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mount file system #7215
Comments
Hi @xiaotailang please give more information. We don't know that board you are using, what config you are using, which steps you took to enable it, etc. Please describe exactly what you are doing and how you are doing it. |
Okay! My development board is stm32f767, I develop i2c driver under nuttx, my i2c slave device is eeprom, after the development of i2c driver is completed, the i2c device is registered as mtd device, which can be done through at24->bwrite();at24->bread( ) callback functions to read and write eeprom. But when I refer to the method of stm32f103 under nuttx, when I mount eeprom as a block device and initialize the file system as vfat, I find that it cannot be mounted normally. I debug the trace and find that the code logic will check whether there is a boot partition in all partitions of the storage device. , return an error code if there is none, and exit. my code exit from there. So I refer to stm32f103 again to try to initialize eeprom as nxffs file system, and then mount it. After testing, I found that the mount can be successfully and files can be created normally in eeprom. However, I found that whether it is a mount operation or a read and write operation on the eeprom in the file system, the response speed is very slow, about tens of seconds, sometimes even a few minutes. I also did a debug trace and found that no matter what I do on the eeprom, the i2c-driven read and write functions are called thousands of times. I continued to debug and found that the logic related to the nxffs file system will erase the entire storage device and other related operations. These operations will call the read and write functions of the underlying i2c driver, so it is time-consuming to operate eeprom through the file system.
Is there something else I need to configure that I haven't considered that is causing the above two problems? |
Hi @xiaotailang you are correct! Using EEPROM with MTD is slow if your EEPROM is I2C. The mount issue you are facing is because the auto-mount command expects that the MTD device be formatted as VFAT before using it. I have a 5 years old tutorial explaining how to use MTD with EEPROM: https://www.youtube.com/watch?v=qzjf2JtgYN0 but that version of NuttX is old. |
Thank you very much for taking the time out of your busy schedule to answer my questions and give your valuable advice. I wish you a happy life! |
I compile the File system mount example with the config options likes this:
[] File system mount example
[] Use block device
(/dev/mtdblock0) Block device name
I can not mount sucess when run mount cmd in console ,and some error info as follow:
nsh> mount
mount_main: mounting vfat filesystem at target=/mnt/fs with source=/dev/mtdblock0
mount_main: mount() returned -1
i have look the error code it is mean Not owner but i can not understand it, so i need some help.
The text was updated successfully, but these errors were encountered: