
Linux / Makefile
Select Linux / Makefile (linux-make) to generate a native Linux meter server. Build from the extracted directory containing Makefile. The output is bin/meter; there is no MCU programming step.
1. Install local tools
Install GNU Make, GCC and the C development libraries. On Debian or Ubuntu:
sudo apt-get update
sudo apt-get install -y build-essential
Configurations whose generated Makefile links OpenSSL (-lcrypto) also need its development package, such as libssl-dev on Debian/Ubuntu. The normal generated link already includes pthread and the math library.
2. Build locally
make
The result is bin/meter, with intermediate object files under obj. To select another compatible C compiler, pass it on the Make command line, for example make CC=clang when Clang is installed. make clean removes the generated build's obj and bin outputs before a rebuild.
3. Docker fallback
For a reproducible Debian build environment, save this as Dockerfile.linux in the extracted project directory:
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential libssl-dev ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /project
ENTRYPOINT ["make"]
Build the image once:
docker build -f Dockerfile.linux -t meterstudio-linux:local .
From the project directory on Linux:
docker run --rm \
--mount "type=bind,source=$(pwd),target=/project" \
meterstudio-linux:local
From Windows PowerShell with Docker Desktop using Linux containers:
docker run --rm `
--mount "type=bind,source=$($PWD.Path),target=/project" `
meterstudio-linux:local
The mounted directory retains bin/meter. Run it in a compatible Linux environment. Build with the native host tools when the deployment system requires another architecture or C-library version.
4. Start and test
Provision the credentials required by the generated README. Minimum's Low association uses client SAP 32 and requires GX_PASSWORD_32 when its password was omitted from export. Then run:
./bin/meter
For a simple desktop connection, select WRAPPER during generation. The server listens on 127.0.0.1 and the configured port (4059 by default). Run the client in an environment that can reach that loopback address, using the configured referencing mode, server address 1 and association client SAP. Use Ctrl+C to stop the process.
If HDLC or Mode E is selected, configure the actual Linux serial device and grant the process access to it. Keep writable persistent state in the project working directory when restarting or updating. The Docker commands above perform compilation; a container's loopback listener requires a separately chosen networking arrangement for client access.
Return to Build.