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
- Select the correct Target in MeterStudio and validate the configuration.
- 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.
- 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.
- Try the local build steps on the MCU page. If the compiler is not installed, use that page's Docker steps instead.
- 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.
- 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"]
- 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"
- 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.