Skip to content

RustyGecko/emlib

Repository files navigation

emlib

Build Status

Rust bindings for Silicon Labs emlib.

emlib compiles and runs on Silicon Labs EFM32 Microcontrollers. It's a proof-of-concept and work in progress, so currently only parts the EFM32 Giant Gecko family of their microcontrollers are supported.

The library have been tested on the following development kits:

Compiling emlib

emlib requires the following tools to build:

If you're on linux, you can install the ARM GCC toolchain like this:

$ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded -y
$ sudo apt-get update -q
$ sudo apt-get install gcc-arm-none-eabi

Compiling the examples

The project uses make to invoke cargo and compile the library and the different examples.

Some common usage is shown below, look to the Makefile for all options.

$ make lib           # Compiles the library only
$ make               # Compiles the library and the default `buttons_int` example
$ make OUT=rtc_blink # Compiles the library and the `rtc_blink` example
$ make examples      # Compiles the library and all examples

Testing

The project also features a test-runner and a small framework for testing and verifying the emlib bindings. The testing uses Unity and CMock and requires ruby to be installed on the system in order to work.

The following builds the tests:

$ make clean-emlib
$ make build-tests

You can then run the tests on your STK3700 Starter Kit. This compiles the test runner, and flashes and runs the tests on the EFM32. The tests are configured to write output over a USART and can be used to help make sure that the bindings are set up correctly.

$ make run-tests

About

Bindings for Silicon Labs emlib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published