-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Feature] Make builtin main importable #408
Comments
I think this is as simple as implementing EDIT: probably |
This requires enabling |
This file is already called |
I'm not sure what you mean here. Do you mean the memory used for allocating objects as the |
It is a bit confusing though that we currently also call the download and run program |
Using the frozen mpy feature might also be a possibility instead of external imports. |
This enables external imports and allows importing the main.mpy file from flash memory. Issue: pybricks/support#408
This enables external imports and allows importing the main.mpy file from flash memory. Issue: pybricks/support#408
Indeed, hence the suggestion to consider changing it. Before we pick something, we could consider what it will be called on SPIKE, and what projects/imports will look like on SPIKE. Then the simpler hubs could perhaps be a strict subset instead of something different entirely. This would be easier to explain and document. |
Since we are considering a multi-file or at least local file interface in Pybricks Code, I think it makes sense to change the name of the download and run file (eventually this will be a name chosen by the user) and keep Another alternative would be to all the ability to give an arbitrary file name instead of |
I meant this.
This would potentially allow for an even bigger builtin script, right? That's pretty cool. Does this require running GCC in Pybricks Code? 😄 |
Hmm... didn't think about that part. Maybe not a possibility then. |
This enables external imports and allows importing the main.mpy file from flash memory. Issue: pybricks/support#408
This enables external imports and allows importing the main.mpy file from flash memory. Issue: pybricks/support#408
Basic fix is committed. Are they any other actionable tasks here? |
Is your feature request related to a problem? Please describe.
Not a problem, but exploring some ideas for technical feasibility.
While we might not be able to support multi-file projects on the smaller hubs, here's an idea that could achieve some of the associated use cases.
Describe the solution you'd like
In short, it would imply making this work:
And we could rename
main
to something more descriptive.This would be even more useful if MicroPython is able to run
.mpy
files without copying them to RAM first. I think this has been mentioned upstream a few times, but I don't know if it is being considered currently.The text was updated successfully, but these errors were encountered: