-
Notifications
You must be signed in to change notification settings - Fork 48
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
Mixing fixed position and PIC apps #82
Comments
The timing is not accidental, because I'm halfway through implementing a solution. To make the process as smooth as possible (rather than sending a deluge of patches), I'd like to educate myself on some opinions first.
|
I made it work, a fixed libtock-rs app together with a PIC libtock-c app:
Output shows both:
If anyone's interested in the "kill it with fire" quality prototype, I keep it in here: https://github.com/dcz-self/tockloader/tree/master . The actual SAT part is rather readable though, and lives in https://github.com/dcz-self/tockloader/blob/master/tockloader/allocate.py Now I'd like to find out how best to proceed with this, because the practical flashing also received some changes. |
I think combining the changes into a PR is fine, as is handling the internal API changes separately. As for adding z3, I'm not sure we want to go that direction. Because it pulls in host code, I'm worried it could make tockloader hard to install to support a narrow use case. What about what we talked about before: placing all of the fixed apps and then appending the PIC apps? |
That could work, although I'm not especially eager to code the algorithm by hand when optimizers come to better solutions with less effort. In either case, the first step would be to separate the act of positioning from the act of flashing, as they are intertwined currently. Then the position solver could be self-contained and pluggable. I'll try to submit something to that effect when I have the time. |
Tockloader currently has 2 separate paths for flashing: one for when all apps are PIC and can go anywhere in the flash, and one for when all have fixed positions in the flash (possibly multiple fixed positions).
This separation fundamentally doesn't have to exist, because (presumably) Tock kernel can make sense out of applications and where to put them if it gets a mix of both.
With libtock-c producing PIC binaries, and libtock-rs producing only fixed ones, until this issue is solved, programs using them cannot coexist.
I'm creating this issue as a place to discuss solving this.
The text was updated successfully, but these errors were encountered: