wokwi / rp2040js

A Raspberry Pi Pico Emulator in JavaScript
MIT License
384 stars 40 forks source link

feat(demo): Optionally load LittleFS image file to simulated flash #92

Closed tomods closed 2 years ago

tomods commented 2 years ago

This adds the capability to load a LittleFS image that was externally created. This is needed for MicroPython to automatically execute scripts, and massively facilitates MicroPython development on rp2040js.

Currently, this is put directly into the existing demo micropython-run.ts – I don't think it is too intrusive for the simple example. I could also move it into a separate file.

tomods commented 2 years ago

For reference, I am currently using this https://github.com/tomods/GrinderController/blob/358ad3e0f795d8cc0bdf4f21bb35f806871d433f/tools/create_littlefs_image.py to generate my LittleFS images.

urish commented 2 years ago

For reference, I am currently using this https://github.com/tomods/GrinderController/blob/358ad3e0f795d8cc0bdf4f21bb35f806871d433f/tools/create_littlefs_image.py to generate my LittleFS images.

Worth adding this to the README (under "Run the demo project"). While at it, I'd also mention Ctrl+X to quit.

Mind adding those into the PR?

urish commented 2 years ago

Excellent, thanks!