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

squirrel port to raspberry pi pico #279

Open
byzantic opened this issue Nov 16, 2023 · 0 comments
Open

squirrel port to raspberry pi pico #279

byzantic opened this issue Nov 16, 2023 · 0 comments

Comments

@byzantic
Copy link

Not really, an issue, so feel free to close ..

I just got squirrel 3.2 running on a pi pico, using a hacked version of the sq example interpreter shell. I had to chop out the cli argument part and always run the interactive loop. minicom also sends \r rather than \n, so I had to accept that as an end of line marker as well. (Yes, I know you can set up a translation config .. but ..)

I did have few issues with the stdio on the pico - some functions write to stdio with no buffering, whereas others (notably the f variants) need an fflush. This seems to be a known issue.

However, sq is still pretty rudimentary, and the inability to load a file means that it's a bit difficult to do much more than one-liners.

As an aside, if one uses a style where function definitions use a { on the same line as the function definition, you can paste a whole function definition in from the terminal.

sq> function mysq(b) {
            return n * n;
}

In fact, if you put an entire program in curly braces, this will also work.

To go much further one would need a more capable interpreter and/or pc-side driver program, in the same vein as micropython. Anyone know of a library that provides that sort of facility?

I suppose one might go a different way, and embed squirrel into micropython somehow, so that one can re-use the repl and file system facilities, though that seems a bit obtuse ..

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

No branches or pull requests

1 participant