Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

MicroPython • Re: Using mpremote to backup and restore flash

$
0
0
Had a play with https://github.com/bulletmark/mpr?tab=readme-ov-file and ran into the same issue.

To copy all the files on the PC I did the following:

Leave boot.py and main.py in the root and make a directory called /home on the device. Put your program code in a directory called /home in your project directory on the PC.

In main.py you have to add:

Code:

import syssys.path.append('/home')
Then use these mpr commands:

Code:

mpr rm --rf /homempr put /home/dave/my_program/home/*.py /home
Haven't found a way to recursively copy /home on the device to /home in the project directory on the PC

Note: there is a depth command to select which files and/or directories to remove.

Statistics: Posted by davefes — Fri Feb 28, 2025 5:30 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles