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

Hardware agnostic kernel #69

Merged
merged 24 commits into from
Dec 23, 2022
Merged

Hardware agnostic kernel #69

merged 24 commits into from
Dec 23, 2022

Conversation

MabezDev
Copy link
Member

@MabezDev MabezDev commented Jun 5, 2022

Moves the non specific hardware code into an agnostic crate - mwatch_kernel. The original implementation has now been moved to mwatch-kernel-stm32l4. Many things were pretty easy to port, but one big change has been to use a trait for System instead of a concrete struct.

TODO

  • Mark as new version
  • Remove st hal completely from generic kernel (Currently date and time types are left)
  • Handle the unwraps on the new ingress event system
  • Test Application interface still works
    • This will also require updating the SDK crate, as we have changed the interface
    • re-add the draw_pixel API so that apps are not build dependant on the kernel
  • Test Ingest works
    • Apps can be stored
    • Syscalls work
    • Notifications work
    • stats
  • Add draw_pixel API back, to control frame buffer implementation
  • (Optional) Update deps, I'd prefer not to if I can avoid the extra work
  • (Optional) update tooling to use probe-rs and remove Makefile completely
  • (Optional) look at tsc parallel acquisition?

…ons of current borrow checker (borrowing fields of self), what's cool is that is _did_ compile with -Zpolonius.
- Removing the System concept completly is not feasible
- Instead of a Struct, System is now a trait
- Added back agnostic display manager
- Added back some states
- Added back the application_manager, however it is currently crippled -
  need to rethink the impl for FFI
- add back uop & notification state
… pointers to all structs, which in turn cast to their concrete types on the kernel implementation side
- add back info state, will less info for now
- Add all the states back to display_manager
Instead of passing the display across the threshold, there is a new
Display trait which exposes FrameBuffer a FFI safe representation of the
frame buffer

- This is easier to send over FFI, no longer a Table entry is needed.
- Safer, casting from *mut () didn't feel right
- Harder to encaptulate display details, i.e pixel format- but we could
  suppliment FrameBuffer with this information.

  A big refactor and deps update may be required soon. I had to jump
  through some hoops for implementing the display wrapper. But it works
  for now.
@MabezDev MabezDev self-assigned this Jun 6, 2022
- Add rtt logging interface
- Implement Display trait for the ssd1351 (kinda hacky, have to switch
  between eg crates)
- Add FB mut method to ssd1351 (need to bump or patch release for this)
- Removed Event from ingress_manager, back to passing System in
- Update `SetupFn` to take a pointer to the Table
- Fixed bug where apps would try and access unitialized memory instead
  of Context/Table
- Add commented code for preloading an app
@MabezDev MabezDev marked this pull request as ready for review December 23, 2022 17:58
@MabezDev MabezDev merged commit 242e805 into master Dec 23, 2022
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

Successfully merging this pull request may close these issues.

1 participant