{"id":13423253,"url":"https://github.com/lobaro/FreeRTOS-rust","last_synced_at":"2025-03-15T15:30:51.924Z","repository":{"id":38330550,"uuid":"254590459","full_name":"lobaro/FreeRTOS-rust","owner":"lobaro","description":"Rust crate for FreeRTOS","archived":false,"fork":false,"pushed_at":"2024-10-21T01:28:55.000Z","size":1208,"stargazers_count":366,"open_issues_count":8,"forks_count":58,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-10-30T21:03:17.425Z","etag":null,"topics":["embedded","freertos","nrf9160","rtos","rust","stm32"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lobaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-10T09:02:29.000Z","updated_at":"2024-10-30T14:52:13.000Z","dependencies_parsed_at":"2024-05-19T14:48:14.176Z","dependency_job_id":"e280191f-c055-4a92-bf3f-994d34bf4f3a","html_url":"https://github.com/lobaro/FreeRTOS-rust","commit_stats":{"total_commits":123,"total_committers":18,"mean_commits":6.833333333333333,"dds":0.5609756097560976,"last_synced_commit":"12a618cbce272c6b16867be8a632cb7c3e20597f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobaro%2FFreeRTOS-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobaro%2FFreeRTOS-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobaro%2FFreeRTOS-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lobaro%2FFreeRTOS-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lobaro","download_url":"https://codeload.github.com/lobaro/FreeRTOS-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243750469,"owners_count":20342066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","freertos","nrf9160","rtos","rust","stm32"],"created_at":"2024-07-31T00:00:26.170Z","updated_at":"2025-03-15T15:30:51.607Z","avatar_url":"https://github.com/lobaro.png","language":"Rust","readme":"# FreeRTOS-rust\n\nThis project is based on code from [freertos.rs](https://github.com/hashmismatch/freertos.rs) and some additions to\n simplify the usage of [FreeRTOS](https://github.com/FreeRTOS/FreeRTOS-Kernel) in embedded applications written\n in Rust.\n\nIn contrast to freertos.rs this crate differs in these points:\n\n- The application `main()` entry point is written in Rust.\n- The FreeRTOS scheduler can be started from Rust.\n- The FreeRTOS heap `MemMang/heap/heap_x.c`is used as global memory allocator for Rust\n- No need for a Clang skeleton project\n\n## How it works\n\nThe `freertos-cargo-build` build-dependency compiles the FreeRTOS code from its original \"C\" sources files into an \narchive to be linked against your Rust app. Internally it uses the [cc crate](https://docs.rs/crate/cc) and some meta \ninfo provided by your apps `build.rs`:\n \n 1. A path to the [FreeRTOS](https://github.com/FreeRTOS/FreeRTOS-Kernel) `Sources`\n 1. A path to the app specific `FreeRTOSConfig.h`\n 1. A relative path to the `FreeRTOS port` to be used, e.g. for ARM Cortex-M3 cores.\n 1. Optional: Additional C code to be compiled\n \n The `freertos-rust` dependency provides an interface to access all FreeRTOS functionality from your (embedded) \n Rust app.\n \n ## Usage\n\n1. Checkout FreeRTOS: https://github.com/FreeRTOS/FreeRTOS-Kernel   \n\n1. Add dependencies to your Rust apps `Cargo.toml`\n\n    ```\n    [dependencies]\n    freertos-rust = \"*\"\n    \n    [build-dependencies]\n    freertos-cargo-build = \"*\"\n    ```\n    \n1. Add this snippet to your apps `build.rs`:\n    ```\n    fn main() {\n        let mut b = freertos_cargo_build::Builder::new();\n    \n        // Path to FreeRTOS kernel or set ENV \"FREERTOS_SRC\" instead\n        b.freertos(\"path/to/FreeRTOS-Kernel\");\n        b.freertos_config(\"src\");       // Location of `FreeRTOSConfig.h` \n        b.freertos_port(\"GCC/ARM_CM3\"); // Port dir relativ to 'FreeRTOS-Kernel/portable' \n        b.heap(\"heap_4.c\");             // Set the heap_?.c allocator to use from \n                                        // 'FreeRTOS-Kernel/portable/MemMang' (Default: heap_4.c)       \n   \n        // b.get_cc().file(\"More.c\");   // Optional additional C-Code to be compiled\n    \n        b.compile().unwrap_or_else(|e| { panic!(\"{}\", e.to_string()) });\n    }\n    ```   \n\n### Used C compiler\n`freertos-cargo-build` depends on the [cc crate](https://docs.rs/crate/cc). So the C compiler\nused can be set by using the `CC` enviroment variable or otherwise defined by internal \ndefaults. For the ARM architecture this is the `arm-none-eabi-gcc` which can be found [here](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads).\n\n## Examples\nTo get started there are examples in [freertos-rust-examples](freertos-rust-examples) for:\n\n* Cortex M33 (nRF9160)\n* Cortex M3 (STM32L151CBU6A)\n* Cortex M4 (STM32F411CEU6)\n* Windows\n* ...more to come...\n\n## Project Crates\n* To build a project using this create see [freertos-cargo-build](freertos-cargo-build)\n* The runtime dependency for you FreeRTOS Rust application will be [freertos-rust](freertos-rust)\n\n\n# License\nThis repository is using the MIT License. Some parts might state different licenses that need to be respected when used.\n\n* The [Linux port](https://github.com/michaelbecker/freertos-addons) is licensed under GPLv2\n\n\n\n\n","funding_links":[],"categories":["Real-time","Rust","Embedded Development"],"sub_categories":["Real-time Operating System (RTOS)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flobaro%2FFreeRTOS-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flobaro%2FFreeRTOS-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flobaro%2FFreeRTOS-rust/lists"}