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:
emlib
requires the following tools to build:
- ARM GCC Embedded Toolchain - Used to build Silicon Labs emlib for the EFM32.
- SEGGER JLink - Used for GDB debugging and to flash the EFM32's from the command line
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
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
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