Crates.io | fe_osi |
lib.rs | fe_osi |
version | 0.1.1 |
source | src |
created_at | 2020-07-30 00:18:10.954704 |
updated_at | 2020-07-30 01:59:22.36499 |
description | OSI to help with writing code for fe_rtos |
homepage | |
repository | https://github.com/badrobotics/FeRTOS |
max_upload_size | |
id | 271114 |
size | 15,195 |
Current build status:
FeRTOS is a simple "operating system" that currently supports ARM Cortex-M CPUs, though support for other architectures is planned for the future. It currently has the following features:
This repository contains two different crates: fe_rtos and fe_osi.
fe_rtos is the crate that contains the kernel, scheduler, and syscall implementations.
fe_osi is the crate that is an interface to the syscalls in fe_rtos for the user program.
Currently, you must load one monolithic binary with fe_rtos, fe_osi, and the user program
to the target device, but in the future, we plan on allowing users to load arbitrary
binaries which will make this distinction more significant.
Important things to note when using this crate in your own projects:
#![no_std]
and #![no_main]
attributes due to the limitations of running without an OSpub fn main() -> !
#[no_mangle]
attribute to work correctlyrustup target add <target_arch>
<target_arch>
would either be thumbv7em-none-eabi
or thumbv7em-none-eabihf
<target_arch>
is thumbv7m-none-eabi
To add this crate to you project, simply open the project's Cargo.toml file and add the following under [dependencies]
fe_rtos = { path = "path to fe_rtos" }
fe_osi = { path = "path to fe_osi" }
To build and load a FeRTOS program using this crate to a microcontroller, you'll need the following programs:
FeRTOS depends on unstable rust features, so you must use the nightly rust compiler to build it.
You can enable this by running rustup default nightly
. To revert back to stable rust, run rustup default stable
.
You probably shouldn't.
This code started from the examples at https://docs.rust-embedded.org/embedonomicon/preface.html.