You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd love a discussion on whether we should expose the full path in the file provider. This is something I couldn't decide on when the feature was added and it almost came down to a coin flip.
This is regarding mounting/opening the local storage of a microcontroller as a workspace folder in the VSCode Explorer via Serial (or telnet / webrepl)
Currently Pymakr does not expose the remote native path, but determines the default path (the rootPath) for the MCU ( /flash , /, or /sd) and exposes that as / in the mounted workspace folder. Also the upload / download logic matches this default path ( the rootPath ) to the root of a project folder.
You could say that the pymaker.conf location is anchored to the deviceRoot.
For devices using different root paths they actually store the files in different locations, but they are shown as being identical
root folder
on disk
project folder
On device
MCU in workspace folder
./flash
./project_x/main.py
./main.py
/flash/main.py
/main.py
./
./project_x/main.py
./main.py
/main.py
/main.py
./sd
./project_x/main.py
./main.py
/sd/main.py
/main.py
./flash and /sd mounted
./project_x/main.py
./main.py
/flash/main.py
/main.py
Notice that :
the paths shown on the device do not match the paths as stored on the device.
you will need the check the device properties to be aware of a device's storage principle
on devices with both /flash and /sd you can see one or the other, but not both
While this makes for a simple setup, it also can be a bit confusing to understand where files actually live.
on the plus side the same project can be simply deployed to devices that have different default rootPaths
Expose actual device path in Explorer
Note: upload/download will require new anchor logic, but project structure remains unchanged
Possibly it makes sense to be able to override a devices DeviceRoot path from the pymakr.conf but not sure how often that would be used.
root folder
on disk
project folder
On device
MCU in workspace folder
./flash
./project_x/main.py
./main.py
/flash/main.py
/flash/main.py
./
./project_x/main.py
./main.py
/main.py
/main.py
./sd
./project_x/main.py
./main.py
/sd/main.py
/sd/main.py
./flash and /sd mounted
./project_x/main.py
./main.py
/flash/main.py
/flash/main.py , and /sd/data.db
Notice that :
the paths shown on the device match the paths that are used by the device.
the project structure remains unchanged
on devices with multiple storage paths ( flash, sd, RAM ) mounted, all paths are accessible
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Originally posted by @jakobrosenberg in #260 (comment)
This is regarding mounting/opening the local storage of a microcontroller as a workspace folder in the VSCode Explorer via Serial (or telnet / webrepl)
Currently Pymakr does not expose the remote native path, but determines the default path (the rootPath) for the MCU (
/flash
,/
, or/sd
) and exposes that as/
in the mounted workspace folder. Also the upload / download logic matches this default path ( the rootPath ) to the root of a project folder.You could say that the
pymaker.conf
location is anchored to the deviceRoot.Current
For devices using different root paths they actually store the files in different locations, but they are shown as being identical
Notice that :
you will need the check the device properties to be aware of a device's storage principle
/flash
and/sd
you can see one or the other, but not bothWhile this makes for a simple setup, it also can be a bit confusing to understand where files actually live.
on the plus side the same project can be simply deployed to devices that have different default rootPaths
Expose actual device path in Explorer
Note: upload/download will require new anchor logic, but project structure remains unchanged
Possibly it makes sense to be able to override a devices DeviceRoot path from the pymakr.conf but not sure how often that would be used.
Notice that :
Beta Was this translation helpful? Give feedback.
All reactions