{"id":20030842,"url":"https://github.com/mayankpatel97/flexos-rtos","last_synced_at":"2026-06-08T03:32:15.591Z","repository":{"id":260813276,"uuid":"868207476","full_name":"mayankpatel97/FlexOS-RTOS","owner":"mayankpatel97","description":"An RTOS (Real time operating system) designed for embedded applications","archived":false,"fork":false,"pushed_at":"2024-11-02T18:08:33.000Z","size":5913,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T05:23:12.019Z","etag":null,"topics":["microcontroller","scheduler","stm32","task-scheduler"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mayankpatel97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-05T18:49:41.000Z","updated_at":"2024-11-02T18:08:37.000Z","dependencies_parsed_at":"2024-11-02T19:28:10.188Z","dependency_job_id":null,"html_url":"https://github.com/mayankpatel97/FlexOS-RTOS","commit_stats":null,"previous_names":["mayankpatel97/flexos-rtos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mayankpatel97/FlexOS-RTOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayankpatel97%2FFlexOS-RTOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayankpatel97%2FFlexOS-RTOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayankpatel97%2FFlexOS-RTOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayankpatel97%2FFlexOS-RTOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayankpatel97","download_url":"https://codeload.github.com/mayankpatel97/FlexOS-RTOS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayankpatel97%2FFlexOS-RTOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34047266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["microcontroller","scheduler","stm32","task-scheduler"],"created_at":"2024-11-13T09:28:44.253Z","updated_at":"2026-06-08T03:32:15.576Z","avatar_url":"https://github.com/mayankpatel97.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlexOS\nFlexOS is a lightweight Real-Time Operating System (RTOS) designed for microcontrollers, featuring a preemptive task scheduler. FlexOS provides efficient task management, prioritization, and scheduling, ensuring that critical processes are handled with real-time responsiveness. Its minimal footprint makes it ideal for resource-constrained embedded systems.\n\n![screenshot](FlexOS_BlockDiagram.png)\n\n🚧 Under Development\nFlexOS is currently under development. Expect feature enhancements and potential bugs. Please report any issues encountered.\n\n# Features\nPreemptive Priority-Based Scheduling: Tasks can be assigned different priorities, allowing higher-priority tasks to preempt lower-priority ones for real-time performance.\nTask Delay Support: Tasks can be delayed for a specified number of ticks, enabling timed execution.\nTime Slicing: Round-robin scheduling between tasks of the same priority ensures fairness.\nLightweight: Designed to be resource-efficient for systems with limited memory and processing power.\nSimple API: FlexOS offers an easy-to-use interface for developers to create tasks and manage scheduling.\n# Installation\nClone the repository:\n    git clone https://github.com/mayankpatel97/FlexOS-RTOS.git\n# Usage\n    #include \"flexos.h\"\n\n    // Define your tasks\n    void task1() {\n        while (1) {\n            // Task 1 code\n        }\n    }\n\n    void task2() {\n        while (1) {\n            // Task 2 code\n        }\n    }\n\n    void task3() {\n        while (1) {\n            // Task 3 code\n        }\n    }\n\n    int main(void) {\n        // Initialize the HAL and system clock\n        HAL_Init();\n        SystemClock_Config();\n\n        // Initialize tasks with different priorities\n        tm_startTask(0, task1);  // Task 1: Low priority\n        tm_startTask(1, task2);  // Task 2: Medium priority\n        tm_startTask(2, task3);  // Task 3: High priority\n\n        // Start the preemptive scheduler\n        tm_startSched();\n\n        // Main loop (may handle background or low-priority operations)\n        while (1) {\n        }\n    }\n\n# API Reference\ntm_startTask(int priority, void (*taskFunc)(void)): Registers a task with a specific priority (higher number = higher priority).\ntm_startSched(): Starts the preemptive task scheduler, enabling task switching and priority-based scheduling.\ntm_tick_handler(): Scheduler tick handler for time slicing and task switching, typically triggered by a timer interrupt.\ntaskDelay(uint32_t ticks): Delays the current task by a specific number of ticks.\n\n# Contributing\nContributions are welcome! To contribute to FlexOS, please follow these steps:\n\nFork the repository.\nCreate a new branch (git checkout -b feature/YourFeature).\nCommit your changes (git commit -m 'Add new feature').\nPush to the branch (git push origin feature/YourFeature).\nOpen a pull request.\n\n# License\nThis project is licensed under the MIT License. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayankpatel97%2Fflexos-rtos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayankpatel97%2Fflexos-rtos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayankpatel97%2Fflexos-rtos/lists"}