GithubHelp home page GithubHelp logo

freertoslinux's Introduction

There is an official Linux Port since FreeRTOS 10.4.0

https://www.freertos.org/2020/09/freertos-kernel-v10-4-0-is-now-available.html

This project is deprecated and won't be continued

FreeRTOS Linux Port

FreeRTOS port implementation for Linux using POSIX threads. Made to test FreeRTOS projects on Linux systems.

Getting Started

Include the files inside the port folder into your FreeRTOS project.

Build the example project

git clone https://github.com/innerand/FreeRTOSLinux.git
make get_freertos
make 

Requirements

  • FreeRTOS 10.2.1, other versions may work but are not tested.
  • Tasks must be created with dynamic memory allocation using vTaskCreate(). Tasks with statically allocated memory are not supported.
  • FreeRTOS should be compiled with a c compiler. C++ doesn't work well with pthread_cancel() which is used to end FreeRTOS tasks. This also applies to c++ functions called within a FreeRTOS task. pthread_cancel() throws an exception which is problematic e.g. within destructors or while another exception is handled. If the program aborts with terminate called without an active exception it was probably because pthread_cancel() was executed at a wrong moment. However, this port is used for CI/CD testing with Gtest/Gmock (C++) and turned out to be quite stable when all the C++ has been put into critical sections.

Usage

  • FreeRTOS tasks may be interrupted at anytime. Therefore all functions that are not async-signal safe (e.g. printf()) must be put into critical sections. If the program crashes or deadlocks within syscalls, it's probably because a function hasn't been put into a critical section.
  • Add an ApplicationIdleTask() to the project and put a nanosleep (without a critical section) into it. Otherwise the port will eat all your CPU time.

Versioning

SemVer is used for versioning. For the versions available, see the tags on this repository

License

This project is licensed under the MIT License - see the LICENSE.md file for details

freertoslinux's People

Contributors

innerand avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.