In this article:
This page is a guide for building firmware applications for the UltraLite Module using the Myriota Software Development Kit (SDK). This page is intended for people that want to customize and develop their own firmware, but you can always use the pre-compiled applications that can be downloaded from Device Manager, section Download Binaries.
Devices must be registered with Device Manager to connect to the Myriota Network. See the Device Manager guide for more details.
Supported Development Platforms
- Ubuntu 24.04 and 22.04
- running natively on a PC with x86-64 architecture (recommended)
- running on WSL2
- macOS 26
The Myriota SDK requires a number of python tools that are only supported on the specified Linux Ubuntu and macOS operating systems running on x86-64 architecture.
Ubuntu 24.04 running natively on x86-64 architecture is the recommended development platform as it removes the complexity associated with virtualised Linux environments on Windows, however you can use it under WSL2 without a problem.
The support for development on Windows was tested using Windows 11 and WSL2.
If you used Windows and don't have WSL installed, please follow this guide.
Software Requirements
You need git in order to clone the repository, once you have it installed, run:
git clone https://github.com/Myriota/SDK.gitThen enter in the repository SDK:
cd SDKThe other software dependencies are installed automatically by executing the script install.sh, the user should be allowed to run commands with sudo, so please enter the password when asked:
./install.shTo verify that the installation went well, run:
./install-test.shIf you see the updater.py tests failing, that is because the SDK/tools isn't in your PATH, it's not necessary but you can add it to be able to execute this and other tools without the entire path. To do so, you need to add the folder to your SHELL configuration file. If you have BASH for example, add this line to the end of the ~/.bashrc file (assuming you cloned the SDK in your home directory):
export PATH="$PATH:~/SDK/tools"
then restart your login session.
If using WSL, you need additional steps and the Windows tool USBIPD to access the device/module from within WSL. To connect the device to WSL, please follow these instructions.
To flash the firmware and see logs, you can use the desktop application DeviceAssist without the need of the tools in SDK/tools.
Device manager account
You need Myriota Device Manager account credentials to perform some actions, for example to download latest System Image firmware using the scripts (but you can download it as well directly on Download Binaries within Device Manager). If you don't have an account, please contact your Myriota account manager.
You will be asked for the credentials when needed. You can use the script myriota_auth.py to create a temporary (30-day) token, so you won't be asked for credentials again during this period:
./tools/myriota_auth.py
Compiling
To compile an example (targeting the DevKit board), go to the example directory, for example the blinky:
cd examples/blinkyThen simply execute make:
makeYou should see Build has completed! at the end:
The generated binary blinky.bin can now be flashed as the User App, either in DeviceAssist or using the updater.py script.
If you are updating from SDK 1.x to SDK 2.0 you may find our migration guide useful.
System Image
System Image is the firmware layer responsible for all the abstractions that are acessible on the SDK functions, for example the scheduling of the wake-ups to send/receive messages.
You need to always make sure to have the compatible version of the System Image on the module. For example: if you used the SDK version 2.2.0 to develop your firmware, you shall have the System Image 2.2.0 flashed on the module. If you already have the corresponding System Image version, you don't need to flash it again.
To get the latest System Image, you can download it either from Download Binaries session in Device Manager or using the script get_system_image.sh script by running from the SDK directory:
./get_system_image.shThe latest System Image will be downloaded as system.img.
Flashing
There are 2 options for flashing the firmware: using the DeviceAssist desktop application or the script SDK/tool/updater.py.
Using DeviceAssist
If you have the DevKit, connect the USB cable to computer and DevKit.
If you have a custom board, you need to select the serial port that contains the Module bootloader, which is the UART0 (pins 55/56).
Click Connect then:
You should see the module details now:
No you need to select the System Image (in case you need to update it) .bin downloaded from Device Manager and the .bin User App with the firmware you just compiled. Always leave the Update Latest SDK 2 selected, so the module will have the updated network info for the next ~8 days and will not enter in Cold Start:
Now click on Update Device.
Using updater.py
After downloading the System Image using the script get_system_image.sh described above, run the following, using the correct serial port:
/dev/ttyUSB0The port on MacOS should be something like /dev/cu.usbserial-001.
To flash the application that you just built, run the same script but with different parameters/file:
./tools/updater.py -u examples/blinky/blinky.bin -p /dev/ttyUSB0You should see:
Persistent logs
There is a small section (4KB for v2 module) of the flash memory that is used to store logs that are persistent across resets. You can add your own user log entries using the LogAdd API call. The logs that are printed with printf() function are not part of these logs.
To manage these logs, you can use either DeviceAssist or the log-util.py script.
Using DeviceAssist, go to the tab Devide Logs after the module is connected. You have all the menus to retrieve logs from the device or from a file (to just visualize it), save to a file and to purge all logs. Here is the example on how to get the logs from the module:
Using log-util.py, just run with the correct serial port then reset the module (don't remove power, just reset it) when asked:
./log-util.py -p /dev/ttyUSB0
You should see the logs:
Troubleshooting
Install test script failure - Command not found for arm-none-eabi-gcc, updater.py, log-util.py etc
Make sure you are using the latest SDK available and run ./install.sh beforehand. You should not see the compiler arm-none-eabi-gcc error anymore. The test script (as well as the Makefiles) on the versions 2.2.0 or later now use a fixed path for the compiler.
As for the updater.py and other scripts errors, please refer to the end of the section Software Requirements.
Install test script failure - Python commands not found
The SDK uses python3, which refers to using the command python throughout script execution.
A useful test is to run the command python --version, for the script to run successfully, this should return a 3.x.x response. If the version is 2.x.x, it indicates that the command python is calling a version that is incompatible with the Myriota SDK. If there is no such file or directory, it indicates that the command python is not known to the development environment.
To confirm python3 is installed, run the command python3 --version. If python3 is not installed, try running the SDK install.sh script again, or manually install python3. If python3 is installed, follow the suggestions below for your development environment.
On Ubuntu 22.04 and above, the package python-is-python3 is required (the install script should have installed this package); to update get-apt and install python-is-python3, run the following commands:
sudo apt-get update
sudo apt-get install python-is-python3
Can't connect via USB
On Ubuntu, check if your user is in the dialout group (i.e user group that gives members access to serial ports) by entering groups in terminal and checking if ‘dialout’ is listed. If not listed, add your user to the dialout group by entering the following command in terminal.
sudo usermod -aG dialout $USER
You will be prompted to enter your password then log out and back in (or reboot) for the changes to take effect. Confirm by entering groups in terminal and checking if ‘dialout’ is listed.
