Skip to main content

Memfault Build ID Tool

This package contains the mflt_build_id CLI tool.

The purpose of the tool is simplify reading or writing Build IDs in a firmware image irrespective of the compiler or build system being used in a project.

Example Usage

$ mflt_build_id --help
usage: mflt_build_id [-h] [--dump [DUMP]] [--crc CRC] [--sha1 SHA1] elf

Inspects provided ELF for a Build ID and when missing adds one if possible.

If a pre-existing Build ID is found (either a GNU Build ID or a Memfault Build ID),
no action is taken.

If no Build ID is found, this script will generate a unique ID by computing a SHA1 over the
contents that will be in the final binary. Once computed, the build ID will be "patched" into a
read-only struct defined in memfault-firmware-sdk/components/core/src/memfault_build_id.c to hold
the info.

If the --crc <symbol_holding_crc32> argument is used, instead of populating the Memfault Build ID
structure, the symbol specified will be updated with a CRC32 computed over the contents that will
be in the final binary.

If the --sha1 <symbol_holding_sha> argument is used, instead of populating the Memfault Build ID
structure, the symbol specified will be updated directly with Memfault SHA1 using the same strategy
discussed above. The only expectation in this mode is that a global symbol has been defined as follow:

const uint8_t g_your_symbol_build_id[20] = { 0x1, };

For further reading about Build Ids in general see:
  https://mflt.io//symbol-file-build-ids

positional arguments:
  elf

options:
  -h, --help     show this help message and exit
  --dump [DUMP]
  --crc CRC
  --sha1 SHA1

Changes

[1.1.1] - 2025-04-18

  • Fix mflt_build_id script to be installed correctly again (regression in 1.1.0)
  • Add an alternate name mflt-build-id for the mflt_build_id script

[1.1.0] - 2024-11-07

  • Remove support for Python 3.6 + 3.7

Metadata

Release files for mflt-build-id 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mflt-build-id 1.1.1
File Size Uploaded Provenance Actions
mflt_build_id-1.1.1.tar.gz 11.8 kB Without provenance Details for mflt_build_id-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mflt-build-id 1.1.1
File Interpreter ABI Platform Actions
mflt_build_id-1.1.1-py3-none-any.whl Python 3 none any Details for mflt_build_id-1.1.1-py3-none-any.whl

Total release size: 24.0 kB

Release files / mflt_build_id-1.1.1.tar.gz

Download URL mflt_build_id-1.1.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a1d0282db8c3806e939c49d253a84250e12913a9a3b0bc967a0afe419370870a
BLAKE2b-256 checksum
How to use checksums
b58d4a5c98f78b2a6f8aa8ef6d96224c28c5523cb199a2068656fa630f440a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release files / mflt_build_id-1.1.1-py3-none-any.whl

Download URL mflt_build_id-1.1.1-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48f1e0bf75b2953424fb501ef850520346a3ffb9f486c9fb120dcacae1a48fe6
BLAKE2b-256 checksum
How to use checksums
19a5cb13384bf935c8cb2a4a8bbb4be79a82650aec2304e74e413e0903308633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Security for mflt-build-id 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page