I want to find out how our system responds when a FAT error occurs during the FAT initialization.
Is there a function or method for killing the FAT file system so that on power up or reboot the initialization process fails?
I tried just opening a file for writing and continuously writing data with no close. This doesn't seem to break things.
I am using IDF 4.4.4 with Arduino.
Thanks,
Mike.
How to create a FAT error for testing?
-
lbernstone
- Posts: 1131
- Joined: Mon Jul 22, 2019 3:20 pm
Re: How to create a FAT error for testing?
You can use esptool to target "damage" at a specific spot in the filesystem. For example, using the default fat partition scheme:
This will clear (0xFF) the first 8 bytes of the partition.
Is the same effect, but with zeros.
Code: Select all
./esptool.py erase_region 0x29000 8Code: Select all
dd if=/dev/zero of=zeros bs=1 count=8
./esptool.py write_flash 0x29000 zerosRe: How to create a FAT error for testing?
Note that this likely actually erases 4096 bytes, as that is the minimum quantity the flash chip allows you to erase.You can use esptool to target "damage" at a specific spot in the filesystem. For example, using the default fat partition scheme:This will clear (0xFF) the first 8 bytes of the partition.Code: Select all
./esptool.py erase_region 0x29000 8
Who is online
Users browsing this forum: ChatGPT-User, Google [Bot] and 6 guests
