Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USB Mass Storage support if an SD card is inserted #66

Closed
gfwilliams opened this issue Oct 1, 2013 · 4 comments
Closed

Add USB Mass Storage support if an SD card is inserted #66

gfwilliams opened this issue Oct 1, 2013 · 4 comments

Comments

@gfwilliams
Copy link
Member

So if you insert an SD card and then plug Espruino in via USB, you get a virtual COM port as well as USB Mass storage device for the SD card.

This would be awesome - but potentially Espruino + the OS accessing the card at the same time could mess up the filesystem...

@tdulik
Copy link

tdulik commented Mar 15, 2018

This idea can be extended - the Mass storage could provide access to the RAM area where the JavaScript is stored.

This way, we could program Espruino from the online web IDE version, using any browser. Just by downloading the generated JS from server and storing it to the mass storage device.

Mbed does it this way, and now also Micro:bit (which is based on Mbed).

(sorry if this idea is proposed in another feature request... this was the first link Google gave me)

@opichals
Copy link
Contributor

Yes the flash content (say the Storage items) could be exposed that way (or via MTP or something simpler perhaps). But USB Mass storage would be the most convenient. It would be nice to see their implementation. Any links?

A related conversation also #221 (comment).

@gfwilliams
Copy link
Member Author

@opichals just beat me to it with the link :) In 1v96 there's actually a Storage module that implements a simple filesystem in Flash memory and which would be perfect for this.

I think exposing the contents of RAM could be a bit more involved, but Storage might not be too bad. I'd definitely be interested if someone wanted to have a go at implementing it. Having said that, just writing source code for execution does mean you miss out on some of Espruino's best features (eg the console, stack traces, debugging, etc).

... everything's going to get a bit more involved soon as I add support for USB on nRF52840. I'm not really sure if we'll be able to abstract everything away enough that there's not loads of code duplication everywhere :(

@gfwilliams
Copy link
Member Author

Closing this - now the IDE has the Storage menus I'm not sure it's so important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants