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

How to start the scheduler? #29

Open
axos88 opened this issue Jul 29, 2019 · 3 comments
Open

How to start the scheduler? #29

axos88 opened this issue Jul 29, 2019 · 3 comments

Comments

@axos88
Copy link

axos88 commented Jul 29, 2019

Can't seem to find the equivalent of vTaskStartScheduler();

@niondir
Copy link

niondir commented Apr 27, 2020

I created a version using some of this code that can run the main() from Rust. I also added added a vTaskStartScheduler() equivalent in FreeRtosUtils::start_scheduler();

You can find the code with some examples here: https://github.com/lobaro/FreeRTOS-rust

@Logarithmus
Copy link

@niondir, you are a hero! I'm struggling with my university project involving FreeRTOS, it's the matter of principle for me now to finish it in Rust. I spent so much time to build the correct version of rustc for AVR, now . And I was practically a total newbie in embedded, so had to understand all the timers, clocks, interrupts and other stuff. So now I hope to get it working finally.

@Logarithmus
Copy link

Logarithmus commented May 8, 2020

@niondir, unfortunately, when I tried to compile your crate for AVR target, I've got LLVM error, something about "invalid bitcast", FnOnce and *i8. AVR support for Rust is highly experimental now, so getting weird LLVM errors is not a surprise. I've heard this maybe caused by the fact that AVR is a Harvard architecture. I ended up doing this project in C++. It's finished now. Maybe someday I'll try using Rust again with FreeRTOS, but I doubt it. If I'll need embedded multitasking, I'll just pick some alternative RTOS written in Rust. Or maybe even use async await. I've read on Reddit that Ferrous Systems is currently working hard on embedded async await

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

No branches or pull requests

3 participants