{"id":13812991,"url":"https://github.com/arabine/qortos","last_synced_at":"2025-05-14T22:31:31.108Z","repository":{"id":182822456,"uuid":"667481886","full_name":"arabine/qortos","owner":"arabine","description":"Quite Ok RTOS - tickless, minimal, 500 lines of code, 7 functions","archived":false,"fork":false,"pushed_at":"2023-08-08T13:32:51.000Z","size":109,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-19T07:40:07.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/arabine.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":"2023-07-17T15:47:30.000Z","updated_at":"2024-08-28T05:53:12.000Z","dependencies_parsed_at":"2024-06-24T01:01:42.008Z","dependency_job_id":"72964e51-9676-4c72-8b87-83152d73b708","html_url":"https://github.com/arabine/qortos","commit_stats":null,"previous_names":["arabine/qortos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arabine%2Fqortos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arabine%2Fqortos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arabine%2Fqortos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arabine%2Fqortos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arabine","download_url":"https://codeload.github.com/arabine/qortos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239602,"owners_count":22037734,"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":[],"created_at":"2024-08-04T04:00:59.373Z","updated_at":"2025-05-14T22:31:26.082Z","avatar_url":"https://github.com/arabine.png","language":"C","funding_links":[],"categories":["OS"],"sub_categories":["RTOS"],"readme":"# QoRTOS\n\n![qortos_logo](logo.png)\n\nQuite Ok RTOS for microcontrollers.\n\n- tickless\n- minimal (500 lines of code)\n- *No* mutexes and semaphores\n- only static memory mailboxes\n- MIT liberal license\n\n## Project goal\n\nThe aim of this project is to provide a very simple and basic RTOS that is easy to port and understand, especially for educational purpose. It was created to test software design of tickless RTOS and avoid typicall problems with mutexes and mis-understanding of semaphores.\n\nA second goal is to be minimal, in the future maybe only one file to drop in your project.\n\n\n## Project status / limitations\n\n- First working version on Raspberry Pico\n- No documentation\n- Not heavily tested\n- Feedback are welcome!\n- Only GCC\n\n## Compatible platforms\n\nOnly GCC is supported for now.\n\n| CPU  | Status |\n| ------- | ---------- |\n| RP2040 (Raspberry Pico)  |   working  |\n\n## TODO before 1.0 stable release\n\n  - [X] Move stacks out of qor.c\n  - [ ] API documentation with examples\n  - [ ] Documentation (only on this README.txt)\n  - [ ] Design documentation (in a separated Markdown file in docs)\n  - [ ] Examples in `examples` directory\n  - [ ] Port on a RISC-V microcontroller\n  - [ ] Mailbox wait in IRQ context (return immediately instead of sleep which is non sense)\n\n# Documentation\n\n## Typical usage\n\n```C\nqor_tcb_t BlinkyTcb;\nqor_tcb_t IdleTcb;\n\nvoid BlinkyTask(void *args)\n{\n    while (1)\n    {\n        ost_hal_gpio_set(OST_GPIO_DEBUG_LED, 0);\n        qor_sleep(500);\n        ost_hal_gpio_set(OST_GPIO_DEBUG_LED, 1);\n        qor_sleep(500);\n    }\n}\n\nvoid IdleTaskFunction(void *args)\n{\n    while (1)\n    {\n        // Use the idle thread for instrumentation or power saving\n\t// Beware, OS functions won't work here\n        // __asm volatile(\"wfi\");\n    }\n}\n\nint main()\n{\n    qor_init(THREADFREQ);\n    qor_create_thread(\u0026BlinkyTcb, BlinkyTask, 3, \"BlinkyTask\");\n    qor_start(\u0026IdleTcb, IdleTaskFunction);\n\n    return 0;\n}\n```\n\n## How to use it in your project\n\n1. Add qor.c and qor_armv6m.s files in your project build system\n2. Initialize the RTOS, create threads and then start it\n\n## Porting guide\n\nFor the moment, the RTOS is limited to the RP2040 MCU (Raspberry Pico), especially for the OS Timer used to wakeup the processor for task switching. It requires a 64-bit timer at us unit as a base time.\nPorting to a 32-bit timer should be quite easy. Some macros should be used to make things agnostic.\n\n## License\n\nMIT License\n\nCopyright (c) 2023 Anthony Rabine\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farabine%2Fqortos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farabine%2Fqortos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farabine%2Fqortos/lists"}