Git Product home page Git Product logo

efm2riot's Introduction

EFM2RIOT

Generator for initializing the EFM32 port for use with RIOT-OS.

Introduction

EFM32 is a 32-bit micro controller (MCU) family manufactured by Silicon Labs. These MCUs are very energy efficient. RIOT-OS is an operating system for Internet of Things applications. It offers a real-time kernel, peripheral abstraction, drivers and network stack.

This generator prepares the required files for using EFM32 with RIOT-OS, which includes:

  • Initializing MCU targets.
  • Initializing board targets.

Usage

As an end-user

When you have cloned this repository, a ready-to-use version is available in the dist/ folder. Copy the desired CPU and board folder from cpu/ and boards/ to your RIOT-OS project.

As a developer

You will need Python 3.7 and the 32-bit MCU SDK 5.9.7.0 (can be installed via Simplicity Studio v4).

  • The efm2riot/configuration.py defines all the jobs and boards.
  • The efm2riot/templates/ folder contains all the files that need to be pre-processed.
  • The efm2riot/static/ folder contains files that will be copied.

To (re)generate all files, run:

python3 EFM2RIOT.py --sdk /path/to/sdk/platform --svds /path/to/svds --dist dist/

To enable some features that are not yet part of RIOT-OS, pass --development.

You can download SVD files from the KEIL website. Categorize them in a folder per family.

See CONTRIBUTING.md for more information on developing.

Supported families

Most of the 32-bit families that are supported by EMLIB are supported by EFM2RIOT:

  • EFM32 Gecko
  • EFM32 Giant Gecko
  • EFM32 Happy Gecko
  • EFM32 Jade Gecko
  • EFM32 Leopard Gecko
  • EFM32 Pearl Gecko
  • EFM32 Tiny Gecko
  • EFM32 Wonder Gecko
  • EFM32 Zero Gecko
  • EFR32 Blue Gecko
  • EFR32 Flex Gecko
  • EFR32 Mighty Gecko
  • EFR32 Zen Gecko
  • EZR32 Happy Gecko
  • EZR32 Leopard Gecko
  • EZR32 Wonder Gecko

Note: not all MCUs may be supported or have sufficient resources for use with RIOT-OS, for instance, low-memory MCUs.

Supported boards

Currently, the following boards (development kits) are supported:

FAQ

Why a generator?

It started as an experiment on generating code from configuration, but turned out to be pretty neat. Apart from that, there are two other reasons:

  • This port patches the vendor header files for warning-free usage with RIOT-OS. After each update, this process must be repeated. This generator automates that process.
  • All supported MCUs are extracted from the SDK. Using templates, new MCUs that are supported by the SDK will also be supported by this port.

Why is this not (yet) part of RIOT-OS?

As of November 2017, support for the EFM32 is included in RIOT-OS. This generator still exists to initialize new targets, albeit it needs to be in sync with RIOT-OS.

What is the benefit of using EMLIB?

The use of EMLIB abstracts away all the chip-specific details, while providing a clean interface to RIOT-OS.

  • EMLIB contains powerful assertions to help development.
  • (New) families are supported, as long as the EMLIB API stays the same.
  • Chip errata (where possible) ensures consistency across revisions of the same chip. This is applied during chip setup.
  • When developing board-specific applications, chances are you will use EMLIB for accessing peripherals.
  • It reduces the number of errors and cuts the development time.
  • The library developers have good understanding of the hardware.
  • No need to 'reinvent the wheel'.

There are doubts on the performance and memory overhead of EMLIB. I have concluded the following, based on a benchmarking script (included):

  • Code size does increase when using EMLIB. The overhead is in the range of 5 to 10 KiB of flash, depending on the target and peripherals used.
  • A large part of the overhead is contained within the clock management unit. This is an integral part for proper clock setup and low-power support. It is used by all peripherals and has a constant code size.
  • Most get/set/read/write/enable/clear methods are implemented as macros or inline methods. They are equally efficient as their direct register alternative.

Some benchmarks are available at http://basilfx.github.io/EFM2RIOT.

As of October 2017, EMLIB is not included anymore, but available as an external package for RIOT-OS. This reduces the number of source files included.

License

See the LICENSE file.

Some of the other port files have been copied from other RIOT-OS ports.

efm2riot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

efm2riot's Issues

Exception: Unable to match CPU with board stk3200

I'm trying to use EFM2RIOT, but I got exception:

$ python EFM2RIOT.py --sdk /mnt/hgfs/vm_share/emlib/ --dist ../RIOT/dist/ 
Found 0 CPUs in 0 families (filtered).
Traceback (most recent call last):
  File "EFM2RIOT.py", line 88, in <module>
    sys.exit(main(sys.argv))
  File "EFM2RIOT.py", line 71, in main
    "Unable to match CPU with board %s" % board["board"])
Exception: Unable to match CPU with board stk3200

I want to use it for SLWSTK6220A board.

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.