Hi,
I found issue with SD card file system create two folders
difference is D (4968) ESP32: mkdir /sdcard/test2 err=-1 fails for latest code.
We are force to use latest code due to CAN driver release in it. Can someone help me to guide how can i extract can driver only code from version 3.2 and put into 3.1.
Also I need to delete non-empty folder. Do I have to do myself by recursively iterate and delete all sub folders and files and make folder empty than I can call rmdir or Can I do rmdir("sdcard/test2/*) and api will handle it.
Log from Version=3.1 works
D (1629) ESP32: mkdir /spiflash/test1 err=0
D (2945) ESP32: mkdir /spiflash/test2 err=0
D (4906) ESP32: rmdir /spiflash/test1 err=0
D (4907) vfs_fat: vfs_fat_rmdir: fresult=6
D (4907) ESP32: rmdir /spiflash/test2 err=-1
D (4983) ESP32: mkdir /sdcard/test1 err=0
D (5115) ESP32: mkdir /sdcard/test2 err=0
D (5144) ESP32: rmdir /sdcard/test1 err=0
D (5145) vfs_fat: vfs_fat_rmdir: fresult=6
D (5146) ESP32: rmdir /sdcard/test2 err=-1
Log from Version=3.2 not working fully.
D (1639) ESP32: mkdir /spiflash/test1 err=0
D (2948) ESP32: mkdir /spiflash/test2 err=0
D (4887) ESP32: rmdir /spiflash/test1 err=0
D (4888) vfs_fat: vfs_fat_rmdir: fresult=6
D (4888) ESP32: rmdir /spiflash/test2 err=-1
D (4966) ESP32: mkdir /sdcard/test1 err=0
D (4967) vfs_fat: vfs_fat_mkdir: fresult=8
D (4968) ESP32: mkdir /sdcard/test2 err=-1
D (5001) ESP32: rmdir /sdcard/test1 err=0
D (5003) vfs_fat: vfs_fat_rmdir: fresult=6
D (5003) ESP32: rmdir /sdcard/test2 err=-1
ESP32 latest version3.2 and last stable version=3.1
Re: ESP32 latest version3.2 and last stable version=3.1
Kindly do reply. We are going into production within 1 month time. need to sort this out.
Re: ESP32 latest version3.2 and last stable version=3.1
You can probably make a hacked up IDF version by copying the "component/driver/can*" files into the older version. However this is not supported or recommended. Better if we can reproduce and fix the bug you're seeing in the v3.2-dev version.snahmad75 wrote: We are force to use latest code due to CAN driver release in it. Can someone help me to guide how can i extract can driver only code from version 3.2 and put into 3.1.
That's correct, the FATFS driver has no capability for removing non-empty directories,.snahmad75 wrote: Also I need to delete non-empty folder. Do I have to do myself by recursively iterate and delete all sub folders and files and make folder empty than I can call rmdir or Can I do rmdir("sdcard/test2/*) and api will handle it.
Is this line the problem? fresult=8 is FR_EXIST, meaning the directory already exists. Are you sure the directory doesn't already exist on the SD card?Log from Version=3.2 not working fully.
D (1639) ESP32: mkdir /spiflash/test1 err=0
D (2948) ESP32: mkdir /spiflash/test2 err=0
D (4887) ESP32: rmdir /spiflash/test1 err=0
D (4888) vfs_fat: vfs_fat_rmdir: fresult=6
D (4888) ESP32: rmdir /spiflash/test2 err=-1
D (4966) ESP32: mkdir /sdcard/test1 err=0
D (4967) vfs_fat: vfs_fat_mkdir: fresult=8
D (4968) ESP32: mkdir /sdcard/test2 err=-1
Who is online
Users browsing this forum: No registered users and 105 guests