Description
I have gotten used to mpremote rm -rv : to clear out the filesystem for those boards that do not have an "erase flash" option in the firmware loader.
Recently that has become a stumbling block when device have ROMFS
mpremote then raises : mpremote: rm: ./rom: No such file or directory.
Which is a terminating error - and stops the recursive removal,
and requires subsequent one-by-one removal of the remain files and folders.
(micropython) jos@SB26:~/micropython/tools/mpremote/tests$ mpremote rm -rf :
rm :
mpremote: rm: ./rom: No such file or directory.
(micropython) jos@SB26:~/micropython/tools/mpremote/tests$ mpremote tree
tree :
:/
├── file1.txt
├── file3.txt
├── lib
│ ├── __future__.mpy
│ ├── __future__.py
│ ├── boardname.py
│ ├── createstubs.mpy
│ ├── createstubs.py
│ ├── createstubs_db.mpy
│ ├── createstubs_db.py
│ ├── createstubs_mem.mpy
│ ├── createstubs_mem.py
│ └── modulelist.txt
├── modulelist_exclude.txt
├── petstore.py
├── rom
│ ├── bar.mpy
│ ├── foo.mpy
│ └── vector-text.svg
└── udp_client.py
I think the best way to handle this is for mpremote to:
- treat this error on a /romxx folder as a non-blocking error , but log it as an error
- stop traversing that folder
- continue the rest of the
rm -r
Code Size
no FW size impact
Implementation
I intend to implement this feature and would submit a Pull Request if desirable
Code of Conduct
Yes, I agree
Description
I have gotten used to
mpremote rm -rv :to clear out the filesystem for those boards that do not have an "erase flash" option in the firmware loader.Recently that has become a stumbling block when device have ROMFS
mpremote then raises :
mpremote: rm: ./rom: No such file or directory.Which is a terminating error - and stops the recursive removal,
and requires subsequent one-by-one removal of the remain files and folders.
I think the best way to handle this is for mpremote to:
rm -rCode Size
no FW size impact
Implementation
I intend to implement this feature and would submit a Pull Request if desirable
Code of Conduct
Yes, I agree