Things to improve for mpremote
- mkdir -p, --parents no error if existing, make parent directories as needed
# copy the src directory to the root of the ESP32 filesystem
# workaround needed for windows issue with mpremote cp -r
cd src
mpremote resume cp -r . :/
cd ..
versus mpremote handling for bash
# copy the src directory to the root of the ESP32 filesystem
mpremote cp -r src/* :/
- Use exceptions instead
- This allows the caller to handle the error gracefully instead of terminating the program
- Either return a value
- or pass a print/log function as oneof the parameters to the API/framework