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

Integrate Kaluma + support JS files #270

Open
drohen opened this issue Jan 11, 2022 · 13 comments
Open

Integrate Kaluma + support JS files #270

drohen opened this issue Jan 11, 2022 · 13 comments
Labels
enhancement New feature or request open for vote Vote at https://wokwi.com/features

Comments

@drohen
Copy link

drohen commented Jan 11, 2022

Wokwi doesn't have a JS runtime for RP2040, and also the code editor doesn't support JS files. Implement loading Kaluma-based projects along with allowing JS files and maybe auto-complete for the Kaluma/JerryScript API.

@drohen drohen added the enhancement New feature or request label Jan 11, 2022
@drohen drohen changed the title Integrate Kalume + support JS files Integrate Kaluma + support JS files Jan 11, 2022
@urish urish added the open for vote Vote at https://wokwi.com/features label Jan 11, 2022
@urish
Copy link
Contributor

urish commented Jan 11, 2022

some implementation notes:

Kaluma Flash Layout. The code is stored separately from the rest of the file system (there's 512kb for code storage, 512kb for the filesystem). It is stored as a simple null-terminated string.

@urish
Copy link
Contributor

urish commented Jan 13, 2022

Well, I managed to hack something together so hopefully it'll be useful enough for your talk:

https://wokwi.com/arduino/new?template=kaluma-pi-pico

@drohen
Copy link
Author

drohen commented Jan 13, 2022

Ok, so it works - which is so great! I'll keep appending to this issue any bugs I find.

@drohen
Copy link
Author

drohen commented Jan 13, 2022

For some reason it does a soft reboot immediately after loading, so I can get a single value out, but then I need to enter: .load code.js in the REPL to get it running again.

@urish
Copy link
Contributor

urish commented Jan 13, 2022

What if you add a delay(1000); at the end of the code?

@drohen
Copy link
Author

drohen commented Jan 13, 2022

I'll try, btw this is a basic example: https://wokwi.com/arduino/projects/320701865454994003

@drohen
Copy link
Author

drohen commented Jan 13, 2022

delay doesn't help

@urish
Copy link
Contributor

urish commented Jan 13, 2022

@drohen
Copy link
Author

drohen commented Jan 13, 2022

Weird though that it needs a loop, but on the board and running it with .load code.js doesn't seem to. Is this something that's likely to do with Wokwi or Kaluma?

@urish
Copy link
Contributor

urish commented Jan 13, 2022

That's a good question!

@drohen
Copy link
Author

drohen commented Jan 13, 2022

I can work with what there is for now anyway, I don't see anything wrong with having a loop with the delay call. If you find it's something to do with Kaluma, I'm sure the dev would be interested. Cheers

@urish
Copy link
Contributor

urish commented Jan 13, 2022

Seems like it was Wokwi. Try your original example again?

@drohen
Copy link
Author

drohen commented Jan 13, 2022

Yep works as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request open for vote Vote at https://wokwi.com/features
Projects
None yet
Development

No branches or pull requests

2 participants