Here are a few examples that demonstrate how to run code on the respective targets on Flocklab.
nRF5: Hello World
A basic sample application for the nRF5 platform is available here.
The application periodically toggles all tracing pins and prints
You can open and compile the project with Segger Embedded Studio. We recommend to use the example without MBR (
Note that you will also need to download the nRF5 SDK and copy it into the folder
nrf-sdk in order to compile the project.
nRF5: RIOT OS
A RIOT port for the nRF5 on FlockLab is available here.
DPP: Hello World
To run a basic 'Hello World' example on our Dual Processor Platform, follow these steps (tested on a Linux machine):
- Make sure the following packages are installed on your computer:
sudo apt-get install msp430-libc binutils-msp430 gcc-msp430 msp430mcu
- Clone the code from our LWB repository and switch to the branch
git clone https://github.com/ETHZ-TEC/LWB.git cd LWB git checkout dpp
- Go into the apps folder and have a look at the
- Compile the code and generate the Flocklab XML config file:
cd apps/hello-world make make flocklab_xml
- Open the file
flocklab-dpp.xmland go through the settings. By default, the following services are used:
- serial logging
- GPIO tracing
- GPIO actuation (only used to select the MCU from which we will get the serial output, default: CC430)
- Submit the XML file on the Flocklab page to schedule a test. Alternatively, use the shell tool and submit your test directly from the command line:
flocklab -c flocklab-dpp.xml
- Note that Flocklab will automatically set the node ID to the observer ID. The ID can be accessed in the code via the global variable
- For more information about our DPP platform, visit our DPP Wiki.
DPP: Glossy and LWB
Follow the instructions in the 'Hello World' example above. The 'Glossy' and 'LWB' code are in the respective folders in
Note that you can pass additional arguments when generating the
flocklab-dpp.xml file, for example:
make flocklab_xml OBSIDS="001 002 003 004 006 007 008 010" TESTDURATION=180 DESCRIPTION="a simple Glossy test"
DPP2 LoRa: Blink LED
The DPP2 LoRa platform features an STM32L433CC MCU and the Semtech SX1262 LoRa radio. More information about the platform is available in our DPP Wiki.
To run a simple 'Blink LED' application on the platform, follow these steps:
- Download the
blink_ledexample code from our DPP repository.
- To open and compile the project, you will need STM32CubeIDE.
- After successful compilation, you should be able to find the file
STM32L433_BlinkLED.elfin the folder
Debug. Encode it to base 64 and insert it into the Flocklab XML configuration file. You can use the
embed_image.shscript for this:
DPP2 LoRa: LWB
A simplified Low-Power Wireless Bus implementation for the DPP2LoRa platform with the SX1262 radio is available as part of the Flora code base. Please have a look at the wiki page to learn more about Flora and the DPP2 LoRa platform.