{"id":49212119,"url":"https://github.com/jnaulet/openpicortos","last_synced_at":"2026-04-23T22:00:43.623Z","repository":{"id":65297007,"uuid":"570639886","full_name":"jnaulet/OpenPicoRTOS","owner":"jnaulet","description":"Very small, safe, lightning fast, yet portable preemptive RTOS with SMP support","archived":false,"fork":false,"pushed_at":"2026-02-12T14:33:54.000Z","size":4271,"stargazers_count":124,"open_issues_count":26,"forks_count":10,"subscribers_count":6,"default_branch":"v1.10.x","last_synced_at":"2026-02-12T23:06:54.928Z","etag":null,"topics":["8051","arduino","arm","avr","c2000","c28x","cortex-m","hcs08","mips","pic32","powerpc","raspberry","risc-v","riscv","rtos","s08","smp","stm8","vle"],"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/jnaulet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jnaulet"}},"created_at":"2022-11-25T17:32:46.000Z","updated_at":"2026-02-12T14:38:39.000Z","dependencies_parsed_at":"2025-12-18T00:11:05.609Z","dependency_job_id":null,"html_url":"https://github.com/jnaulet/OpenPicoRTOS","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/jnaulet/OpenPicoRTOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnaulet%2FOpenPicoRTOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnaulet%2FOpenPicoRTOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnaulet%2FOpenPicoRTOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnaulet%2FOpenPicoRTOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnaulet","download_url":"https://codeload.github.com/jnaulet/OpenPicoRTOS/tar.gz/refs/heads/v1.10.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnaulet%2FOpenPicoRTOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32200159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T20:19:26.138Z","status":"ssl_error","status_checked_at":"2026-04-23T20:19:23.520Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["8051","arduino","arm","avr","c2000","c28x","cortex-m","hcs08","mips","pic32","powerpc","raspberry","risc-v","riscv","rtos","s08","smp","stm8","vle"],"created_at":"2026-04-23T22:00:36.758Z","updated_at":"2026-04-23T22:00:43.616Z","avatar_url":"https://github.com/jnaulet.png","language":"C","funding_links":["https://github.com/sponsors/jnaulet"],"categories":[],"sub_categories":[],"readme":"![picoRTOS](etc/images/banner.png)\n\n# OpenPicoRTOS [![Latest Release](https://img.shields.io/github/release-date/jnaulet/OpenPicoRTOS)](https://img.shields.io) [![Commits since](https://img.shields.io/github/commits-since/jnaulet/OpenPicoRTOS/latest/v1.10.x)](https://img.shields.io)\n\nVery small, safe, lightning fast, yet portable preemptive RTOS with SMP support.\n\n## Quick Presentation\n\npicoRTOS is a small hard RTOS with as little overhead as humanly possible.\n\n## Table of contents\n\n  1. [Book of requirements](#book-of-requirements)\n  1. [How to use](#how-to-use)\n  1. [API Documentation](#api-documentation)\n  1. [Supported architectures](#supported-architectures)\n  1. [Featured devices](#featured-devices)\n  1. [Working principle](#working-principle)\n  1. [Inter-processus communication](#inter-processus-communication)\n  1. [Shared priorities](#shared-priorities)\n  1. [FIFO scheduling](#fifo-scheduling)\n  1. [Interrupt management](#interrupt-management)\n  1. [Staging tree](#staging-tree)\n  1. [Integration in your workflow](#integration-in-your-workflow)\n  1. [Featured demos](#featured-demos)\n\n## Book of requirements\n\nOpenPicoRTOS has been designed with these requirements in mind:\n  - Compliance with \"The Power Of 10\" from the NASA/JPL (https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code)\n  - Compliance with MISRA C 2012\n  - Limited use of inline assembly:\n    - Inline assembly should be side-effect free (no use or modification of variables)\n    - Inline assembly can be safely removed from the static analysis\n  - Smallest footprint possible\n  - Fully static\n  - Fully predictable\n  - High portability\n  - Lowest overhead possible\n  - Support for SMP\n  - Less than 400 lines of code\n\nMore information here: https://github.com/jnaulet/OpenPicoRTOS/blob/main/etc/Requirements.md\n\n## How to use\n\n### Step1: Preparation of your project\n\nTo create a project compatible with OpenPicoRTOS you first need to add a specific kind of Makefile to your project.   \nYou can find a very basic template here: https://github.com/jnaulet/OpenPicoRTOS/blob/v1.10.x/samples/Makefile.template\n\n### Step2: configuration of your project\n\nSimply type:\n\n    # make menuconfig\n\n![screenshot](etc/images/make-menuconfig.png)\n\nAnd configure your project according to your needs.\nYou can find a lot of examples in the demo directory.\n\n### Step3: Compilation of your project\n\n    # make\n\n### Step4: Static analysis of your project\n\n    # make staticcheck\n\nor, alternatively:\n\n    # make splint\n    # make cppcheck\n\n### Bonus: all availables targets\n\nUsing the template makefile automatically offers you access to a new set of targets for the OpenPicoRTOS build system,\ndirectly in your project directory:\n\n```\nCleaning targets:\n  clean           - Remove most generated files but keep the config and\n                    enough build support to build external modules\n  mrproper        - Remove all generated files + config + various backup files\n  distclean       - mrproper + remove editor backup and patch files\n\nConfiguration targets:\n  config          - Update current config utilising a line-oriented program\n  nconfig         - Update current config utilising a ncurses menu based program\n  menuconfig      - Update current config utilising a menu based program\n  xconfig         - Update current config utilising a QT based front-end\n  gconfig         - Update current config utilising a GTK based front-end\n  oldconfig       - Update current config utilising a provided .config as base\n  localmodconfig  - Update current config disabling modules not loaded\n  localyesconfig  - Update current config converting local mods to core\n  silentoldconfig - Same as oldconfig, but quietly, additionally update deps\n  defconfig       - New config with default from ARCH supplied defconfig\n  savedefconfig   - Save current config as ./defconfig (minimal config)\n  allnoconfig     - New config where all options are answered with no\n  allyesconfig    - New config where all options are accepted with yes\n  allmodconfig    - New config selecting modules when possible\n  alldefconfig    - New config with all symbols set to default\n  randconfig      - New config with random answer to all options\n  listnewconfig   - List new options\n  oldnoconfig     - Same as silentoldconfig but set new symbols to n (unset)\n\nOther generic targets:\n  all             - Build target\n\nTest targets:\n  check           - Run static analysis on all basic platforms + unit tests\n\nStatic analysis targets:\n  splint          - Run splint -checks on the source code\n  cppcheck        - Run cppcheck --enable=all on the source code\n  staticcheck     - Run both previous checks\n\n  make V=0|1 [targets] 0 =\u003e quiet build (default), 1 =\u003e verbose build\n\n```\n\n## API Documentation\n\nHTML documentation of the complete API is available in the documentation directory and\nat the following address: https://jnaulet.github.io/OpenPicoRTOS\n\n## Supported architectures\n\n### Single core\n\n - ARM Cortex-M0+\n - ARM Cortex-M3\n - ARM Cortex-M4/F\n - ARM Cortex-M7\n - Atmel ATMega Series\n - Atmel TinyAVR Series\n - Intel 8051 / MCS51\n - MIPS M51xx / PIC32Mx\n - NXP/Freescale HC08/S08\n - PowerPC e200z4\n - PowerPC e200z7\n - RISC-V RV32IMAC\n - RISC-V RV32EC\n - STMicroelectronics STM8\n - TI C2000 / c28x\n\n### Multi-core SMP\n - PowerPC e200z4 SMP\n - PowerPC e200z7 SMP\n - RP2040 SMP\n\n### Simulation\n\n - POSIX threads / Linux\n - WIN32 threads / Windows\n\n## Featured devices\n\n - Atmel ATMega2560\n - Atmel ATMega328P\n - Atmel ATMega32u4\n - Atmel ATSAM3X8E\n - Atmel ATSAMD5x/E5x\n - Atmel ATtiny817\n - Atmel ATtiny414\n - Atmel ATtiny88\n - Atmel ATtiny1607\n - Atmel ATSAMV7x/E7x\n - Cypress CY7C6801xA / EZ-USB FX2\n - GigaDevice GD32VF103\n - LogicGreen LGT8F328P\n - Microchip PIC32MZ-EF\n - Nuvoton MS51 series\n - Nuvoton N76E003\n - NXP MC9S08PTxx series\n - NXP MPC574x series\n - NXP MPC577x series\n - Raspberry Pico RP2040\n - Renesas RA4M1\n - STC MCU STC12C5Axx series\n - STMicroelectronics STM32F10xxx series\n - STMicroelectronics STM32F401x series\n - STMicroelectronics STM32H743/750\n - STMicroelectronics STM8Sx03 series\n - Texas Instruments TMS320F2837xD\n - WCH CH32V003\n\n## Working principle\n\nOn every new cycle (tick), picoRTOS stops the execution of the current task and runs the highest\npriority task available.   \nA few criteria make a task available for scheduling, it has to be:\n  - Ready (aka not sleeping/busy)\n  - The tick modulo has to match the task sub-priority (see shared priorities)\n  - In case of SMP, the task core mask has to match the current running core\n\nAny syscall (picoRTOS_schedule, picoRTOS_sleep or picoRTOS_sleep_until) will allow picoRTOS to run\nthe next highest priority task available until it reaches idle or a new tick occurs and the cycle\nstarts over.\n\nTask execution order goes from highest (0) to lowest (CONFIG_TASK_COUNT - 1) priority.\n\nExample:\n\n    tick: prio0 -\u003e prio1 -\u003e prio2 -\u003e ... (towards idle)   \n    tick: prio0 -\u003e prio1 -\u003e prio2 -\u003e ... (towards idle)\n    ...\n\nNo memory management is offered, everything is static, which makes the static analyzer's\njob much easier for critical applications.\n\n## Inter-processus communication\n\nThe following IPCs are provided:\n\n - futexes (require arch_test_and_set)\n - re-entrant mutexes (require arch_compare_and_swap)\n - conditions (require mutexes)\n - queues (requires futexes)\n\n## Shared priorities\n\nVersion 1.7 introduces shared priorities for tasks, a.k.a round-robin scheduling.\n\nWhen several tasks share the same priority, the order of execution (highest to lowest\npriority) doesn't change, but these tasks will be executed alternatively, on a tick\nmodulo basis.\n\nExample with 2 tasks (B \u0026 C) sharing a priority of 1:\n\n    tick 0: taskA (prio 0) -\u003e taskB (prio 1) -\u003e taskD (prio 2) -\u003e ...    \n    tick 1: taskA (prio 0) -\u003e taskC (prio 1) -\u003e taskD (prio 2) -\u003e ...  \n    tick 2: taskA (prio 0) -\u003e taskB (prio 1) -\u003e taskD (prio 2) -\u003e ...  \n    tick 3: taskA (prio 0) -\u003e taskC (prio 1) -\u003e taskD (prio 2) -\u003e ...  \n    ...\n\n## FIFO scheduling\n\nVersion 1.10 introduces FIFO scheduling via a new API call, picoRTOS_postpone().\n\nThis will instruct the scheduler to move to the next task by order of priority \u0026 put\nthe current task back in the scheduling FIFO, to be executed before idle().\n\nFor the sake of readability, schedule will get the symbol '-\u003e' \u0026 postpone will get the   \nsymbol '\u003e\u003e' in the following example (2 tasks, A \u0026 B):\n\n    tick 0: taskA (prio 0) -\u003e taskB (prio 1) -\u003e idle\n    tick 1: taskA (prio 0) \u003e\u003e taskB (prio 1) -\u003e taskA (prio 0) -\u003e idle\n    tick 2: taskA (prio 0) \u003e\u003e taskB (prio 1) \u003e\u003e taskA (prio 0) -\u003e taskB (prio 1) -\u003e idle\n    ...\n\n## Interrupt management\n\nVersion 1.5 introduces contextual interrupt management as an experimental feature.\n\nAll architectures are supported (at least partially) at the moment.\n\nThis feature should be used with care, as interrupts tend to destroy the real-time part in\n\"RTOS\".\n\n## Staging tree\n\nVersion 1.8 introduces the staging tree.\n\nThis tree contains code that builds \u0026 fits the book of requirements but could\nnot be tested for one reason or the other.\n\nThis code should be considered highly experimental until validation.\n\n## Integration in your workflow\n\nIn order to make picoRTOS easy to integrate in your embedded standalone projects,\na new 'make deploy' target has been added.\n\nThis will deploy a minimalistic picoRTOS tree in your working directory, containing\nonly the files/drivers you need in order to build your project (except the linker files),\nthus eliminating the potential dead code issue.\n\nHere's the basic workflow:\n\n    # cp path/to/picoRTOS/samples/Makefile.in Kbuild\n    # make -f Kbuild menuconfig\n\nHere you can configure your project according to your needs\n\n    # make -f Kbuild deploy\n\nThis will create the corresponding picoRTOS tree \u0026 a picoRTOS/Makefile.in file you\ncan include in your own Makefile.\n\nYou can then add the Kbuild, tree, include/generated/config.h and even the .config in your\ngit/svn/other repository.\n\n## Featured demos\n\nBasic demo code is provided for the following boards:\n  - Adafruit ItsyBitsy M4 Express\n  - Arduino Due\n  - Arduino Mega2560\n  - Arduino Nano v3 + LGT8Fx clone (staging)\n  - Arduino Uno\n  - Arduino Uno R4 Minima\n  - ATtiny817-Xplained Mini\n  - ATtiny1607 Curiosity Nano\n  - Curiosity 2.0 PIC32 MZ EF\n  - DevEBox STC-C51\n  - DevEBox STM32H7xx_M\n  - Infineon EZ-USB FX2LP\n  - Microchip SAME70 XPlained Ultra\n  - MH-Tiny / MH-Tiny88 (staging)\n  - Nuvoton N76E003 / MCU-E003\n  - NXP Devkit MPC5748G (dual-core SMP)\n  - NXP MPC5775E-EVB (dual-core SMP) (staging)\n  - NXP S08PT60-EVK (staging)\n  - Sipeed Longan Nano\n  - STMicro STM32F103C8T6 development board (staging)\n  - STMicro STM32F401RCT6 development board (staging)\n  - STMicro STM8S003F3P3 development board (staging)\n  - Texas Instruments Launchxl-f28379d\n  - Raspberry Pi Pico (single core \u0026 SMP)\n  - WCH CH32V003F4P6 eval board (staging)\n\nA portability demo is available in demo/amigaball-lcd and works with the\nfollowing boards (+0.96\" LCD):\n  - Adafruit ItsyBitsy M4 Express\n  - Sipeed Longan Nano\n  - Texas Instruments Launchxl-f28379d\n  - Raspberry Pi Pico SMP\n  - DevEBox STM32H7xx_M / STM32H743VIT6\n  - Arduino Mega2560\n\nLinks:\n  - https://www.youtube.com/watch?v=XeARSjY81Tk\n  - https://www.youtube.com/watch?v=Bh-oae4uF4Y\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnaulet%2Fopenpicortos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnaulet%2Fopenpicortos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnaulet%2Fopenpicortos/lists"}