This new award winning development AI IoT kit from Nordic NRF54LM20-DK Nordic Semiconductor ASA | Development Boards, Kits, Programmers | DigiKey can also be used with the Rust language.
Here we will describe how to setup this devepment kit in the Linux operating system to be able to start with a basic Rust application. First proceed to install Rust as follows,
Digikey_Coffee_Cup# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Now lets create a basic application to test the installation in the Linux computer by doing this in a directory of preference,
Digikey_Coffee_Cup# cargo new hello-rust
this will create the following directory hello-rust
.
└── hello-rust
├── Cargo.toml
└── src
└── main.rs
Now navigate to the directory hello-rust and run the Rust application as follows,
Digikey_Coffee_Cup@hello-rust# cargo run
Compiling hello-rust v0.1.0 (..../hello-rust)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
Running `target/debug/hello-rust`
Hello, world!
The Rust source code main.rs is,
fn main() {
println!("Hello, world!");
}
This is self-explanatory at this point. Now that we have Rust properly installed in the Linux computer, now please use one of the previous articles to install the proper Zephyr pre-requisites (Like this one here) before moving on with the next steps. First navigate to the Zephyr directory of the new award winning development AI IoT kit from Nordic NRF54LM20-DK Nordic Semiconductor ASA | Development Boards, Kits, Programmers | DigiKey and issue the following commands,
(venv) DigiKey_Coffee_Cup# west config manifest.project-filter +zephyr-lang-rust
then,
(venv) DigiKey_Coffee_Cup# west update
At this point we have included the Rust development language into Zephyr for this platform. Proceed to create the following directory inside the samples directory of the existing Zephyr installation and create this directory hello_world-rust,
(venv) DigiKey_Coffee_Cup# zephyr/zephyrproject/ mkdir samples/hello_world-rust
Create the following CMakeLists.txt inside that directory.
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_rust_world)
rust_cargo_application()
Also include the required Rust Cargo.toml file shown here,
# Copyright (c) 2024 Linaro LTD
# SPDX-License-Identifier: Apache-2.0
[package]
# This must be rustapp for now.
name = "rustapp"
version = "0.1.0"
edition = "2021"
description = "A sample hello world application in Rust"
license = "Apache-2.0 or MIT"
[lib]
crate-type = ["staticlib"]
[dependencies]
zephyr = "0.1.0"
log = "0.4.22"
In that directory also include the following proj.conf file with these parameters for Zephyr,
# Copyright (c) 2024 Linaro LTD
# SPDX-License-Identifier: Apache-2.0
# The default 1k stack isn't large enough for rust string formatting with logging.
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_RUST=y
CONFIG_RUST_ALLOC=y
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=n
in the src directory place the following Rust source code for this demo and name it as lib.rs,
// Copyright (c) 2024 Linaro LTD
// SPDX-License-Identifier: Apache-2.0
#![no_std]
use log::info;
#[no_mangle]
extern "C" fn rust_main() {
unsafe {
zephyr::set_logger().unwrap();
}
info!("DigiKey Coffee Cup: Hello world from Rust on {}", zephyr::kconfig::CONFIG_BOARD);
}
At this stage the hello_world-rust directory should look like the typical Rust application,
├── Cargo.lock
├── Cargo.toml
├── CMakeLists.txt
├── prj.conf
└── src
└── lib.rs
Finally, build the Rust application using the classical Zephyr build,
(venv) DigiKey_Coffee_Cup# zephyr/zephyrproject/ west build -p always -b nrf54lm20dk/nrf54lm20b/cpuapp zephyr/samples/hello_world-rust/
...
....
Compiling rustapp v0.1.0
(/zephyr/zephyrproject/zephyr/samples/hello_world-rust)
Finished `release` profile [optimized] target(s) in 1m 08s
[176/176] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 54700 B 2036 KB 2.62%
RAM: 11184 B 511 KB 2.14%
IDT_LIST: 0 B 32 KB 0.00%
Generating files from /zephyr/zephyrproject/build/zephyr/zephyr.elf for board: nrf54lm20dk/nrf54lm20b/cpuapp
Then connect the new award winning NRF54LM20-DK Nordic Semiconductor Development Kit via the USB cable from the Linux host as shown in the next picture,
To complete this Zephyr Rust demo, flash the Nordic NRF54LM20-DK Nordic Semiconductor ASA | Development Boards, Kits, Programmers | DigiKey as follows,
(venv) DigiKey_Coffee_Cup# zephyr/zephyrproject/ west flash
-- west flash: rebuilding
[0/8] Building Rust application
...
...
Finished `release` profile [optimized] target(s) in 0.05s
-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
Using board 001051861371
-- runners.nrfutil: Flashing file:/zephyr/zephyproject/build/zephyr/zephyr.hex
-- runners.nrfutil: Connecting to probe
-- runners.nrfutil: Programming image
-- runners.nrfutil: Verifying image
-- runners.nrfutil: Reset
-- runners.nrfutil: Board(s) with serial number(s) 1051861371 flashed successfully.
Open a minicom terminal,
DigiKey_Coffee_Cup# minicom -D /dev/ttyACM1
press RESET in the platform and then the Rust developer should see the following message,
Welcome to minicom 2.10
OPTIONS: I18n
Port /dev/ttyACM1, 14:41:20 [U]
Press CTRL-A Z for help on special keys
*** Booting Zephyr OS build v4.4.0-rc3 ***
[00:00:00.002,092] <inf> rust: rustapp: DigiKey Coffee Cup: Hello world from Rust on nrf54lm20dk
This has completed the Rust development in Linux setup demonstration for this new Nordic AI IoT platform. Please stay tuned for our next part in this series. This new Embedded World 2026 award winning Nordic AI Axon NPU IoT NRF54LM20-DK development kit is available at DigiKey.
Have a great day!
This article is available in spanish here.
Este artículo está disponible en español aquí.

