{"id":13419368,"url":"https://github.com/DISTORTEC/distortos","last_synced_at":"2025-03-15T05:31:14.439Z","repository":{"id":20201278,"uuid":"23472650","full_name":"DISTORTEC/distortos","owner":"DISTORTEC","description":"object-oriented C++ RTOS for microcontrollers","archived":false,"fork":false,"pushed_at":"2024-10-29T23:09:33.000Z","size":27901,"stargazers_count":434,"open_issues_count":4,"forks_count":67,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-10-30T01:48:09.256Z","etag":null,"topics":["arm","arm-microcontrollers","cortex-m","cpp","cpp11","embedded","framework","library","microcontroller","microcontrollers","operating-system","real-time","rtos"],"latest_commit_sha":null,"homepage":"https://distortos.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DISTORTEC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-08-29T17:51:56.000Z","updated_at":"2024-10-29T23:09:37.000Z","dependencies_parsed_at":"2024-01-07T00:07:21.492Z","dependency_job_id":"cbcfaa02-b3e2-4845-bdcf-06b39158d56e","html_url":"https://github.com/DISTORTEC/distortos","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DISTORTEC%2Fdistortos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DISTORTEC%2Fdistortos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DISTORTEC%2Fdistortos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DISTORTEC%2Fdistortos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DISTORTEC","download_url":"https://codeload.github.com/DISTORTEC/distortos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690113,"owners_count":20331726,"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":["arm","arm-microcontrollers","cortex-m","cpp","cpp11","embedded","framework","library","microcontroller","microcontrollers","operating-system","real-time","rtos"],"created_at":"2024-07-30T22:01:14.973Z","updated_at":"2025-03-15T05:31:14.433Z","avatar_url":"https://github.com/DISTORTEC.png","language":"C++","readme":"distortos\n=========\n\nobject-oriented C++ RTOS for microcontrollers\n\n[Homepage](https://distortos.org/)\u003cbr/\u003e\n[Documentation](https://distortos.org/documentation/)\u003cbr/\u003e\n[Source Code @ GitHub](https://github.com/DISTORTEC/distortos)\u003cbr/\u003e\n[Forum](https://groups.google.com/d/forum/distortos)\u003cbr/\u003e\n\n![Build Test](https://github.com/DISTORTEC/distortos/workflows/Build%20Test/badge.svg)\u003cbr/\u003e\n![Test Board Generator](https://github.com/DISTORTEC/distortos/workflows/Test%20Board%20Generator/badge.svg)\u003cbr/\u003e\n![Unit Tests](https://github.com/DISTORTEC/distortos/workflows/Unit%20Tests/badge.svg)\n\nConfiguration \u0026 building\n------------------------\n\nTo configure \u0026 build *distortos* you need:\n- [CMake](https://cmake.org/) (version 3.8 or later);\n- [a build tool supported by CMake](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#manual:cmake-generators(7)) -\nit is highly recommended to use [Ninja](https://ninja-build.org/);\n- [arm-none-eabi bleeding-edge-toolchain](https://github.com/FreddieChopin/bleeding-edge-toolchain) (*GCC* version 10 or\nlater);\n\n*distortos* tries to follow typical *CMake* cross-compiling workflow, which means that you always have to use a\nso-called *toolchain file*. Toolchain files in *distortos* also serve another purpose - they select the board which is\ngoing to be used by your application.\n\n1. Download source package of *distortos* in [zip](https://github.com/DISTORTEC/distortos/archive/master.zip) or\n[tar.gz](https://github.com/DISTORTEC/distortos/archive/master.tar.gz) format and extract it;\n2. Create a build folder, for example `output`;\n3. From within the build folder, initialize it with *CMake*, for example with\n`cmake .. -DCMAKE_TOOLCHAIN_FILE=../source/board/ST_STM32F4DISCOVERY/Toolchain-ST_STM32F4DISCOVERY.cmake -GNinja` if you\nwant a default configuration or\n`cmake -C../configurations/ST_STM32F4DISCOVERY/test/distortosConfiguration.cmake .. -GNinja` if you want to start from a\nsaved configuration;\n4. Edit *distortos* configuration with a tool of your choice, for example `cmake-gui ..` (a GUI application) or\n`ccmake ..` (*curses*-based application);\n5. Execute selected build tool, for example `ninja` or `ninja -v` if you want to see all command lines while building;\n\nYou can obviously replace step 1 with `git clone https://github.com/DISTORTEC/distortos`.\n\nSteps 2-4 can be all done from within `cmake-gui`. After starting the application use *Browse Source...* button to\nselect the folder with *distortos* and *Browse Build...* button to select the build folder. Then click on *Configure*\nbutton. In the *CMakeSetup* window which appears select the generator of your choice and make sure that\n*Specify toolchain file for cross-compiling* is selected before going any further. Click *Next* and specify the\ntoolchain file (which also selects the board), for example\n`\u003csource-folder\u003e/source/board/ST_STM32F4DISCOVERY/Toolchain-ST_STM32F4DISCOVERY.cmake` and click *Finish* button.\n\n### Test application\n\nThe default target of build - *all* - is just the static library with *distortos* `libdistortos.a`. If you want to build\nthe test application, specify `distortosTest` as the target (for example `ninja distortosTest` if you use *Ninja*).\n\n### tl;dr\n\n    $ wget https://github.com/DISTORTEC/distortos/archive/master.tar.gz\n    $ tar -xf master.tar.gz\n    $ cd distortos-master\n    $ mkdir output\n    $ cd output\n    $ cmake .. -DCMAKE_TOOLCHAIN_FILE=../source/board/ST_STM32F4DISCOVERY/Toolchain-ST_STM32F4DISCOVERY.cmake -GNinja\n    $ cmake-gui ..\n    $ ninja\n\nor\n\n    $ wget https://github.com/DISTORTEC/distortos/archive/master.tar.gz\n    $ tar -xf master.tar.gz\n    $ cd distortos-master\n    $ mkdir output\n    $ cd output\n    $ cmake -C../configurations/ST_STM32F4DISCOVERY/test/distortosConfiguration.cmake .. -GNinja\n    $ cmake-gui ..\n    $ ninja\n\nGenerating board\n----------------\n\nTo generate a board you need:\n- [Python](https://www.python.org/) (version 2.7, version 3.6 or later);\n- [Jinja2](https://palletsprojects.com/p/jinja/) template engine for *Python* (version 2.10 or later);\n- [ruamel.yaml](https://bitbucket.org/ruamel/yaml) YAML loader/dumper package for *Python*;\n\nBoth *Jinja2* and *ruamel.yaml* can be easily installed with `pip install jinja2 \u0026\u0026 pip install ruamel.yaml` (or\n`python -m pip install jinja2` followed by `python -m pip install ruamel.yaml` on *Windows*), however they may also be\navailable in the package manager of your system.\n\nBoard generator - `scripts/generateBoard.py` - takes a `*.yaml` file as an input and produces a folder containing\nvarious board files: source files, headers, *CMake* files (including *CMake* toolchain file) and so on. The input\n`*.yaml` file describes the board hardware in a tree-like form. The idea is very close to *devicetree* and in fact\nearlier versions of board generator used *devicetree* files.\n\nTo get an idea about the format of the board YAML files, take a look at some of the existing files, for example\n`source/board/ST_STM32F4DISCOVERY/ST_STM32F4DISCOVERY.yaml` - which describes *STM32F4DISCOVERY* board from *ST* - or\n`source/chip/STM32/STM32F4/chipYaml/ST_STM32F407VG.yaml` - which describes *STM32F407VG* chip used on this board. There\nis also some documentation about YAML bindings in `documentation/yaml-bindings`\n\nAssuming that you already have *distortos* either as part of your project or as a standalone folder, the basic\ninvocation of the board generator is just `path/to/distortos/scripts/generateBoard.py path/to/board.yaml` (or\n`python path/to/distortos/scripts/generateBoard.py path/to/board.yaml` on *Windows*), for example\n`./scripts/generateBoard.py source/board/ST_STM32F4DISCOVERY/ST_STM32F4DISCOVERY.yaml`. You may also generate so-called\n*raw-boards*, using chip YAML file as the input directly, for example\n`./scripts/generateBoard.py source/chip/STM32/STM32F4/chipYaml/ST_STM32F407VG.yaml -o output/path/of/raw/board`.\n","funding_links":[],"categories":["TODO scan for Android support in followings","RTOS","OS"],"sub_categories":["ESP8266","RTOS"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDISTORTEC%2Fdistortos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDISTORTEC%2Fdistortos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDISTORTEC%2Fdistortos/lists"}