Tracking issue for running on embedded platforms #8
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rafaelcaricio/lvgl-rs#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So currently, this crate has only been tested in the embedded-graphics simulator. I have encountered two problems compiling for an embedded target:
I'm happy to contribute to get this to work but I'm a little bit stumped. I thought I should at least document it here in case anyone else can figure it out. I look forward to using this crate in the future.
Thank you @sajattack ! I'm also not having much time lately. But I will try to get into this when I have some time.
@sajattack It should be working now. I made a basic mistake of forgetting to include
#![no_std]
to the lvgl-sys crate. Please try again and let me know.Btw, we still need the flag
-Zfeatures=build_dep
to build.That should be not needed after https://github.com/rust-lang/cargo/issues/7915 is fixed.
Needs alloc?
Yes, we need alloc. You can find how to setup an allocator here: https://github.com/rafaelcaricio/pinetime-rtfm/blob/master/pinetime-rtfm/src/main.rs#L37
I will publish later a simplified example of how to do this.
Ok, just not very
#![no_std]
friendly to have alloc.Well, LittlevGL do allocate memory dynamically. So there is not really a workaround for that.
@sajattack I have updated the README with the points we discussed in this thread so others are aware. https://github.com/rafaelcaricio/lvgl-rs#building-for-embedded-environments
Please let me know if we can close this issue. Also, you are welcome to amend the README.md with any other info you think would be important to know. I really appreciate you help and interest in this project.
I'm testing now. Currently getting a display full of static, is there a method I need to call to flush lvgl to the display?
You need to call those two methods:
So LittlevGL will load the framebuffer and flush to the display.
https://docs.lvgl.io/v7/en/html/porting/project.html#initialization
Sorry, it's not working for me and I don't have time to debug.
Ok, no worries. I will update the readme with some step-by-step so it is easier for everyone (including me).
As the main concern in this ticket is solved, I will close. Please open a new ticket for further questions.
@sajattack About your concern on the dependency on
alloc
, maybe this idea would makelvgl-rs
flexible enough: https://github.com/rafaelcaricio/lvgl-rs/issues/16