GithubHelp home page GithubHelp logo

nephyr's Introduction

Nephyr

Nim interface and library for Zephyr RTOS. Run Nim on any microcontroller Zephyr supports!

WIP! The API and package layout are still prone to large changes. That being said, it's possible to run Nim code on Zephyr and once it compiles it's appears very stable.

Setup

  1. Install Nim (recommend choosenim )
  • The Nim devel branch is currently required: choosenim devel --latest
  1. Install Zephyr
  • pip3 install west
  • west init -m https://github.com/EmbeddedNim/zephyr.git --mr nephyr-v2.7-branch-patched --narrow $HOME/zephyrproject/
  • note there's work to improve this usine nephyrcli but it's not ready for public use yet
  1. Recommended to install Nephyr using nimble develop as the library will be changing frequently:
  • git clone https://github.com/EmbeddedNim/nephyr.git
  • cd nephyr/
  • nimble develop

Layout

The library layout is broken into two main portions:

  • Nim apis under src/nephyr/
  • C Wrappers under src/zephyr/

Examples

See Nephyr Examples repo for examples.

Why

Zephyr is taking a great approach to modernize RTOS & embedded development. It has support from multiple MCU vendors (NXP, Nordic, TI, etc). In some areas it's still less mature than other RTOS options, however it's rapidly improving and already boasts support for most modern MCU's. It also includes a bootloader, device drivers, and first class CI and testing. The primary downside is the lack of documentation especially when combined with the complicated nature of a very configurable RTOS.

Nephyr's goal is to provide a stable high-level wrapper around Zephyr. However, the hardware APIs are being designed with being compatible with other RTOS'es. Eventually Nim could replace parts of Zephyr C stack with pure Nim solutions.

Status

Working

  • Zephyr networking via POSIX layer
  • Support for using Zephyr sockets & poll
  • Nim wrappers for the basics of Zephyr devices and device tree
  • Support for Firmware OTA updates using Nim
  • I2C works and tested with real devices
  • SPI raw api works, Nim SPI api is written but not verified
  • Basic set of boards working with Nephyr out-of-the-box + nrf52480, STM32-H7 "Disco Boards", Teensy 4 (WIP)

Ongoing

  • Documentation!
  • Significantly improve the Nim interface to the DTS system in Zephyr
  • Setup auto-installer for Zephyr
  • Setup CI builds with Zephyr
  • Setup CI run tests using QEMU

nephyr's People

Contributors

elcritch avatar

Stargazers

David Goldstein avatar  avatar  avatar Gianluigi Spagnuolo avatar Jorge Valdez avatar Piotr Usewicz avatar Paul avatar Regis Caillaud avatar Charl P. Botha avatar Paul G avatar Masanori Ogino avatar Lup Yuen Lee avatar Hugo Sena Ribeiro avatar Jan Weitz avatar robert y  avatar Thomas Johnson avatar Wesley Kerfoot avatar  avatar  avatar Constantine Molchanov avatar Derek avatar Qaziquza avatar  avatar  avatar Adam M avatar v2h avatar

Watchers

 avatar Andreas Rumpf avatar  avatar

Forkers

elcritch nodecum

nephyr's Issues

Devel still required?

Just wanted to check that Nim devel is still needed for this. Got Zephyr up and running on it's own for my board but wanted to try this out instead of Nesper as per our quick convo in the Issues for that initially, but my VSCode had issues with choosenim for whatever reason (despite being sure the PATH variables were correct and so on) and I had to install v1.6.4 manually

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.