Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Hey! I’m doing a personal project to explore RTOS’s, safety critical software architecture, and utilizing rust. I want to be able to have graphical output, and I’ll be supporting Vulkan SC, as well as others for desktop. I don’t have access to anything proprietary (looking at you LynxOS), so I’m looking for open source alternatives that have a similar system architecture (such as partitioned ram), as well as a hardware stack I could use, but I’m unsure where to look for RTOS + VulkanSC + displays.
I’ve built a pal/hal/rhi combo before, and I’m seasoned with c/c++ and rust. I’ve also done embedded before, but not with an RTOS or with proper displays.
Any pointers to the above would be absolutely amazing.
Not sure about rust but Zephyr can help you achieve this though you would have to do all the GPU grunt work, not sure how much effort you would have to put in. I imagine it is a task.
I did some thinking a while back on it could be nice using the RPI 5. I thought of starting from here https://github.com/Yours3lf/rpi-vk-driver
RPI5 has native support for vulkan. Zephyr supports it.
Oh this is interesting, I didnβt even consider a pi. For the goals of my project, a dedicated GPU is desired but Iβll explore this a bit.
An RHI isnβt bad since youβre just telling a GPU driver what to do and uploading shader binaries to execute, but Iβve never touched actual display driver code.
Reading this: <https://www.raspberrypi.com/news/vulkan-update-version-1-2-conformance-for-raspberry-pi-4/>
PI5 has the videocore ii
https://docs.zephyrproject.org/latest/boards/raspberrypi/rpi_5/doc/index.html
A quick hw description here.
Ahhhh
Makes sense.
Plus you can do some rust in Zephyr not sure about the extent of the support.
Well to be conformant, itβd just be a c api.
Rust interops with c quite easily. Same as c++, lots of extern and ffi
Oh I see what you mean, compiler support
Iβm not worried about that as Iβm building my own PAL anyway, looks like the api is available via generated c bindings to the zephyr kernel so itβs not a showstopper for me
FFI between c and rust can be easy but I think one must be very careful since the cases for undefined behavior may not be very apparent.
Take a look at the rust Vulkan ash bindings: <https://github.com/ash-rs/ash>
the gold standard for an ffi library is an enforced type system that translates c bindings into safe(r) rust apis.
Iβd do vastly the same so UB can be checked against, or tested out
<https://github.com/tylerwhall/zephyr-rust/blob/master/rust/zephyr-core/src/mempool.rs>
actually someone already put in a ton of work
Nice.
Looks like a path has been paved for you.
Definitely gives me a great starting point
All the best. Be really nice learning from your journey.
Thanks! Iβll be sure to share once I have something of substance.
CONTRIBUTE TO THIS THREAD