Skip to content

RIOT#

Prerequisites#

In addition to the common prerequisites:

  • make version 4.0+ (on macOS, install via brew install make and use gmake)
  • ARM cross-compiler for ARM-based boards:
# Debian/Ubuntu
sudo apt install gcc-arm-none-eabi

# Or use Nix
nix develop

Setup#

Clone and initialize submodules:

git clone https://github.com/lf-lang/lf-riot-uc-template.git my-project
cd my-project
git submodule update --init --recursive

Building#

Configure LF_MAIN and BOARD in the Makefile, then:

make all

Or override on command line:

make LF_MAIN=HelloWorld BOARD=nucleo-f446re all

For native Linux simulation:

make BOARD=native all

Flashing#

make flash

Or with parameters:

make LF_MAIN=HelloWorld BOARD=nucleo-f446re flash

Terminal#

Open a serial terminal:

make term

Log Level#

Edit the Makefile:

CFLAGS += -DLF_LOG_LEVEL_ALL=LF_LOG_LEVEL_DEBUG

Network Channels#

Channel Mode Description
TCP/IP Async TCP sockets via RIOT's GNRC stack
CoAP/UDP Async CoAP over UDP for IoT networks
UART Polled, Async Serial point-to-point

macOS Notes#

Use gmake instead of make (macOS ships with make 3.81, RIOT requires 4.0+):

brew install make
gmake all