can I reset a thingy filesystem without flashing
Posted: Fri Aug 09, 2019 2:41 am
I have a bunch of null directories on my thingy (don't ask). ....ok, I've been resetting a deadlocked interpreter using this abomination, while pressing reset...
I'm sure there's a better way (what is it please! ampy doesn't work while the interpreter is deadlocked...)
Manually calling main() from prompt is the obvious answer to that.
Anyway, all 129 directories have the same name and inode:
...where 'inode' is a sfw alias for FFFFFFFF‬'d. ...actually not an inode as I see the filesystem is FAT I may seek an alternative...
anyway,returns ENOENT.
I can flash the thingy, but my MP build is currently broken and, well, I'm lazy (obviously). Anyway, this is all what I call exploratory testing.. I'm learning a lot just by writing this topic.
So, my question is: can I reset/format the filesystem without flashing the device?
Sorry about the rambling explanation..
Cheers,
Bitrat
Code: Select all
while :
do
expect -c 'send \003\003\003\003\003\003\003\003\003\003\003\003\003\003\003' > /dev/ttyS4
expect -c 'send "\rimport uos\r";' > /dev/ttyS4
s="\ruos.remove('main.py')\r"
expect -c "send ${s};" > /dev/ttyS4
expect -c 'send \004\004\004' > /dev/ttyS4
done
Manually calling main() from prompt is the obvious answer to that.
Anyway, all 129 directories have the same name and inode:
Code: Select all
('\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', 16384, 0, 4294967295)
anyway,
Code: Select all
uos.rmdir('\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00')
I can flash the thingy, but my MP build is currently broken and, well, I'm lazy (obviously). Anyway, this is all what I call exploratory testing.. I'm learning a lot just by writing this topic.
So, my question is: can I reset/format the filesystem without flashing the device?
Sorry about the rambling explanation..
Cheers,
Bitrat