Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Gurux DLMS MeterStudio
  3. Gurux DLMS MeterStudio
  4. Build
By Gurux Documentation , 30 November, 2026
Gurux DLMS MeterStudio

Building turns the generated C source into firmware for a particular processor. Each MCU needs its own compiler options, SDK, linker script and programming tool. An ESP32-S3 binary cannot run on an STM32, even when both projects expose the same DLMS objects.

Use an installed local compiler first. If it is unavailable, follow the Docker route on the MCU page. Docker supplies a build environment; the SDK, board connection and any required passwords or keys still have to be provided.

Choose your MCU

MeterStudio target MCU and board Quick start
Espressif ESP32-S3 ESP32-S3, Xtensa ESP32-S3
ST NUCLEO-L433RC-P STM32L433RC, Cortex-M4 STM32L433RC
Silicon Labs Mighty Gecko BRD4158A EFR32MG13P733F512GM48 on WSTK EFR32MG13P
Nordic nRF9160 DK nRF9160, secure Cortex-M33 application nRF9160

Windows / Visual Studio and Linux / Makefile are desktop meter servers, not MCU firmware. Build and run them using the README included in their generated project; there is no MCU flash step.

Before either build route

  1. Select the correct Target in MeterStudio and validate the configuration.
  2. Generate and extract the ZIP. Open a terminal in the extracted directory containing its README and build files. Do not run the commands in the MeterStudio generator's own source directory.
  3. Provision credentials as described in the README, or explicitly include the intended test secrets when generating the project. Ordinary exports omit passwords and keys. A successful compile does not provision missing credentials.
  4. Try the local build steps on the MCU page. If the compiler is not installed, use that page's Docker steps instead.
  5. Program the board using the file and procedure for that MCU. Close Director and serial monitors before programming or testing the connection.

Docker setup

Install Docker Desktop on Windows, or Docker Engine on native Linux. Start it and check:

docker version

The command must report a running Server, not just an installed client. Use Linux containers. The examples below use Linux/amd64 images; use a compatible host or Docker's supported emulation.

ESP32-S3 uses Espressif's ready-made image. The three Arm MCU pages use the local image below for compilation. There is no assumed public gurux/... Docker image to download.

Prepare the Arm Docker image once

The generated Arm projects currently use PowerShell build scripts and look for compiler executables with a .exe suffix. This Linux image supplies PowerShell, Arm GCC, Newlib and aliases for those names. The SDKs are mounted separately, so they are not copied into the image.

  1. Create a plain text file named Dockerfile.arm in your extracted project directory:
FROM mcr.microsoft.com/powershell:7.4-ubuntu-22.04
SHELL ["/bin/sh", "-c"]
ARG UBUNTU_MIRROR=https://azure.archive.ubuntu.com/ubuntu
RUN sed -E -i "s#https?://(archive|security).ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g" /etc/apt/sources.list \
    && apt-get update && apt-get install -y --no-install-recommends \
    gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi \
    ca-certificates libusb-1.0-0 libudev1 openocd \
    && mkdir -p /opt/arm/bin \
    && ln -s /usr/bin/arm-none-eabi-gcc /opt/arm/bin/arm-none-eabi-gcc.exe \
    && ln -s /usr/bin/arm-none-eabi-objcopy /opt/arm/bin/arm-none-eabi-objcopy.exe \
    && ln -s /usr/bin/arm-none-eabi-size /opt/arm/bin/arm-none-eabi-size.exe \
    && rm -rf /var/lib/apt/lists/*
ENV ARM_GCC_BIN=/opt/arm/bin
WORKDIR /project
ENTRYPOINT ["pwsh", "-NoLogo", "-NoProfile"]
  1. Download the base image and build the local package. Run from the directory containing Dockerfile.arm:
docker pull --platform linux/amd64 mcr.microsoft.com/powershell:7.4-ubuntu-22.04
docker build --platform linux/amd64 -f Dockerfile.arm -t meterstudio-arm:local .
docker run --rm meterstudio-arm:local -Command "arm-none-eabi-gcc --version"
  1. Follow the SDK mount and build command on your MCU page. The project is mounted read/write; SDK directories are mounted read-only. Output remains in the project's build directory when the container exits.

The first image build downloads compiler packages and needs an Internet connection. The resulting meterstudio-arm:local image can be reused for the other Arm targets. Record its image ID and compiler version when reproducing a release.

Docker and physical USB devices

Compiling does not require a connected board. Programming does.

On Windows, the straightforward route is Docker build, then the manufacturer's Windows flash tool. This does not require a Windows compiler. A Windows COM port or USB probe is not automatically visible in a Linux container.

On native Linux Docker Engine, the MCU pages also describe device access for container flashing. Substitute the actual USB or serial device; examples are not a request to program every connected board. Docker Desktop USB/IP needs separate configuration and compatible devices; see Docker's USB/IP instructions.

Updating an existing meter

Keep its configuration, application source and required secret provisioning. Build the updated project, use the MCU's documented firmware programming command, then reconnect and read the association view again. Ordinary updates should preserve settings, security counters and history partitions. Do not replace these commands with mass erase, recover, or a different partition layout.

Return to the manual.

  • Log in or register to post comments
  • Create new account
  • Reset your password

Book navigation

  • Standard
  • Target
  • Referencing
  • Transport
  • Associations
  • Passwords
  • Security
  • Objects
  • Validation
  • ZIP
  • Build
    • ESP32-S3
    • STM32L433RC
    • EFR32MG13P
    • nRF9160

Hire Us!

Latest Releases

  • Mon, 11/30/2026 - 14:21
    gurux.dlms.c 9.0.2611.3001
  • Thu, 11/26/2026 - 15:24
    gurux.dlms.c 9.0.2611.2601
  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97

New forum topics

  • Landis E650 meter reading over DLMS
  • class_id = 40, version = 2, pushsetup Unparsed data frame
  • GXObisValueItem entries without MaskSize appear to be interpreted as bit flags
  • CheckedListBox incorrectly selects GXObisValueItem Value=0 for non-zero values
  • UIValueType=TextBox is rendered as CheckedListBox when Values are defined
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin