
MKM35Z512VLL7
Select NXP MKM35Z512VLL7 (nxp-mkm35z512vll7). The generated project builds a Cortex-M0+ integration library for your board application. Its output is build/libmeter.a; startup code, the linker script and a board firmware image are supplied by the board application.
1. Configure and export
Choose the board's HDLC UART, TX and RX pins on the Target page, and the optional RS-485 enable pin and polarity when used. Validate, export and extract the project. Pin choices must match your actual board wiring.
The selected routing is recorded in generated/mcu_pin_config.c and generated/pin-configuration.json. The port/bit values are MCU identifiers rather than physical package-pin numbers.
2. Build locally
Install the arm-none-eabi variant of Arm GNU Toolchain, including GCC and the archiver. In Windows PowerShell, from the extracted project directory:
.\build.ps1 -GccBin C:/Tools/ArmGNU/bin
Replace the example path with your installation, or set ARM_GCC_BIN and run build.ps1 without the option. The script compiles for cortex-m0plus, Thumb and the soft-float ABI, then creates build/libmeter.a. A successful archive build completes the library compilation stage.
3. Docker build
Prepare the updated Arm Docker image. It includes the arm-none-eabi-ar.exe alias required by the exported script. In Windows PowerShell:
docker run --rm --platform linux/amd64 `
--mount "type=bind,source=$($PWD.Path),target=/project" `
meterstudio-arm:local -File ./build.ps1 -GccBin /opt/arm/bin
On native Linux:
docker run --rm --platform linux/amd64 \
--mount "type=bind,source=$(pwd),target=/project" \
meterstudio-arm:local -File ./build.ps1 -GccBin /opt/arm/bin
The archive remains in the mounted project's build directory. Rebuild an older Arm image if the script reports a missing archiver.
4. Link into the board application
Link build/libmeter.a into the native MKM35 board project using compatible processor and ABI options. Alternatively, integrate the files listed in generated/sources.txt into that project. Add dlms/include, generated and application to the include paths and force-include generated/cosem_objects.h in every participating C compilation unit so its feature flags and data layout agree with the library.
Implement MeterBoardOps from application/meter_board.h: board configuration, monotonic milliseconds, receive/transmit, optional RS-485 enable, persistent storage and password provisioning as required by the generated configuration. Apply the selected pin routing using the matching board SDK or register definitions. Call meter_board_start(&ops), then meter_board_poll() regularly from one foreground context. Buffer UART input in the board's ISR/DMA layer.
The board project also supplies clocks, startup, interrupt handlers, the linker layout and the programming procedure. Persistent settings require two logical 8 KiB banks in reserved nonvolatile memory, outside application load sections. Check the final board link map for RAM, stack and flash use before programming the linked firmware with the board's tools.
Return to Build.