wokwi-features icon indicating copy to clipboard operation
wokwi-features copied to clipboard

SD Card support in Visual Studio Code Plugin

Open Marcus10110 opened this issue 2 years ago • 6 comments
trafficstars

I'm unable to access any files from the virtual SD Card when running the simulator from VS code.

Specifically, the ls command prints out an empty list:

Files on card:
   Size    Name

However, if I restart the simulator using the restart button, I see diagram.json.

   Size    Name
      1496 diagram.json

Refreshing after that continues to just show diagram.json.

I have quite a few other files in the *.ino directory.

I've been testing with this project, both in the webapp and in vs code locally. This works great in the webapp. https://wokwi.com/projects/365487016657699841

Marcus10110 avatar May 23 '23 04:05 Marcus10110

I can confirm the VS Code plugin does not support loading files into the SD Card at the moment.

urish avatar May 23 '23 12:05 urish

Thanks @urish!

I'd love to see this on the feature voting site then.

Marcus10110 avatar May 23 '23 16:05 Marcus10110

Done!

urish avatar May 23 '23 22:05 urish

For background, I'm very excited to use wokwi to streamline the development process for embedded UIs. There are a handful of other options for rapid prototyping embedded UI, such as implementing the high level UI code in a cross platform way and targeting x86 for development, but the ability to just simulate the hardware should hopefully be much less overhead. I'm hoping to get to the point where I can recompile and simulate in seconds, on every save - just like web development.

A key piece of of this workflow is to quickly and easily add images - ideally by just pasting new images into a data folder and then immidiately accessing them from code.

The next step after this would be to automatically grab screenshots from the simulated LCD screen, and automate the process of displaying and screen-grabbing every screen. Then I could easily compare all the screens with figma prototypes, somewhat like how storybook.js can display react components in an easy to develop way.

I'm really enjoying wokwi so far! Thanks to the whole team for creating such a great tool.

Marcus10110 avatar May 24 '23 04:05 Marcus10110

Interesting, thanks for explaining! Just had a discussion with the engineers of Embedded Wizard this week, are you familiar with their product?

The next step after this would be to automatically grab screenshots from the simulated LCD screen, and automate the process of displaying and screen-grabbing every screen. Then I could easily compare all the screens with figma prototypes, somewhat like how storybook.js can display react components in an easy to develop way.

It's already possible with the Wokwi CLI (through GitHub actions). It's not yet documented, but I can create a quick example and share it on GitHub.

Based on your questions / suggestions, it seems like you have an interesting use case. If you'd like to hop on a call and discuss it, I'd love to.

urish avatar May 26 '23 08:05 urish

@urish I'm excited by the possibility of using the VSCode extension to speed up development work on our picoTracker project. Having a sdcard is essential as currently our firmware has a hard requirement on a sdcard for storing at a minimum its config and project files, though I could put some hacks in to workaround that, reading/writing to the sdcard is actually some of the dev work I'd like to use wokwi to speed up the dev cycle with! 🙂

maks avatar Sep 25 '24 10:09 maks