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
  5. EFR32MG13P
By Gurux Documentation , 30 November, 2026
Gurux DLMS MeterStudio

Use this quick start for Silicon Labs Mighty Gecko BRD4158A, MCU EFR32MG13P733F512GM48, connected to a WSTK/BRD4001A mainboard. The generated firmware is a standalone DLMS application, not a radio-stack example.

1. Download tools and SDK

For the local build, install Arm GNU Toolchain, choosing arm-none-eabi, and Gecko SDK 4.5.x. Use Gecko SDK for this Series 1 MCU; a different SDK family is not a drop-in replacement.

Obtain the SDK using Simplicity Studio's SDK manager, or clone the pinned release with Git:

git clone --branch v4.5.1 --depth 1 https://github.com/SiliconLabs/gecko_sdk.git C:/SDKs/gecko_sdk

Check that platform/Device/SiliconLabs/EFR32MG13P/Include/efr32mg13p733f512gm48.h exists below the SDK root.

Download Simplicity Commander for the computer used to flash the board, and install its required SEGGER J-Link support. Keep the complete Commander package, not just the executable. The vendor provides installation instructions and standalone downloads.

2. Build locally first

Extract the MeterStudio project and open Windows PowerShell in the directory containing build.ps1:

.\build.ps1 -GeckoSdkPath C:/SDKs/gecko_sdk -GccBin C:/Tools/ArmGNU/bin

Replace both paths with your installed locations. The script also accepts GECKO_SDK_PATH and ARM_GCC_BIN environment variables. Successful output is build/meter.elf, meter.hex, meter.bin and meter.map.

If no local compiler is available, use Docker below. You still need the Gecko SDK files.

3. Docker fallback: download and build

Prepare the Arm Docker image. This downloads the PowerShell base and builds meterstudio-arm:local with Arm GCC; no pre-existing Gurux image is assumed.

From the extracted project directory, in Windows PowerShell:

$projectDir = (Get-Location).Path
$geckoSdk = (Resolve-Path C:/SDKs/gecko_sdk).Path
docker run --rm -v "${projectDir}:/project" -v "${geckoSdk}:/sdk:ro" meterstudio-arm:local -File ./build.ps1 -GeckoSdkPath /sdk -GccBin /opt/arm/bin

For native Linux, use:

docker run --rm -v "$PWD:/project" -v /opt/sdks/gecko_sdk:/sdk:ro meterstudio-arm:local -File ./build.ps1 -GeckoSdkPath /sdk -GccBin /opt/arm/bin

Replace the SDK path with the extracted Gecko SDK root. The generated build/meter.hex remains available on the host after Docker exits.

4. Program and reset the board

  1. Fit BRD4158A to the WSTK. Set the mainboard power switch to AEM, debug mode to MCU, and connect the J-Link USB cable.
  2. Find the intended probe's J-Link serial number in Simplicity Studio or the probe's label. Do not use the example serial of another board.
  3. From the project directory, run the generated script using the installed Windows Commander:
.\flash.ps1 -CommanderPath C:/Tools/commander/commander.exe -ProbeSerial YOUR_JLINK_SERIAL

The script programs the HEX for EFR32MG13P733F512GM48, checks the programmer's result and resets the MCU. This is also the default Windows flash procedure after a Docker build; a local compiler is not required.

Container flashing on native Linux

For an all-container flash step, download the Linux Commander package, extract it, and follow its vendor dependency/J-Link setup. Windows executables do not run in this Linux image. The commands below assume the complete Linux package, including its required libraries, is in /opt/tools/commander.

First check the tool inside the container:

docker run --rm -v /opt/tools/commander:/tools/commander:ro --entrypoint /tools/commander/commander meterstudio-arm:local --version

If the vendor package reports a missing shared library, install the dependency documented for that Commander release in a derived image before continuing. The common build image supplies the compiler and libusb; it does not redistribute Commander or guarantee the dependencies of every Commander release.

Use lsusb to identify the intended J-Link USB node. Substitute that node and serial, then program and reset:

docker run --rm --device=/dev/bus/usb/001/004 -v "$PWD:/project" -v /opt/tools/commander:/tools/commander:ro --entrypoint /tools/commander/commander meterstudio-arm:local flash build/meter.hex --device EFR32MG13P733F512GM48 --serialno YOUR_JLINK_SERIAL
docker run --rm --device=/dev/bus/usb/001/004 -v /opt/tools/commander:/tools/commander:ro --entrypoint /tools/commander/commander meterstudio-arm:local device reset --device EFR32MG13P733F512GM48 --serialno YOUR_JLINK_SERIAL

On Windows Docker Desktop, use the host flash script unless USB/IP has been configured separately.

5. Connect and update later

Use the JLink CDC UART port in Director, with the WSTK board controller's VCOM speed matching the firmware: default HDLC 9600, 8N1, no flow control. Firmware routing is USART0 TX PA0 / RX PA1, location 0, VCOM enable PA5. COM-port numbers depend on the host.

Use Minimum with None/Low authentication on this target; High/GMAC, radio services and DLMS Image Transfer are not implemented by its generator. Low credentials must be provisioned or explicitly included during project generation.

For an update, rebuild and repeat the HEX programming step. Do not mass erase: 0x0007C000–0x0007FFFF holds settings, leaving 496 KiB for firmware. A successful compile is not a hardware interoperability test; verify the actual board connection and saved settings after programming.

Return to Build.

  • 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