Skip to content

DEV-833/DEV-834 Print firmware version in factory test report; include-safe version.h - #110

Merged
marknolan merged 2 commits into
mainfrom
DEV-833-834_fw_version_in_factory_test_report
Jul 2, 2026
Merged

DEV-833/DEV-834 Print firmware version in factory test report; include-safe version.h#110
marknolan merged 2 commits into
mainfrom
DEV-833-834_fw_version_in_factory_test_report

Conversation

@marknolan

@marknolan marknolan commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Adds the firmware version to the factory test report (shared by Shimmer3 and Shimmer3R) and makes the generated version.h include-safe. This is the shared counterpart of DEV-832 (Verisense).

Jira: DEV-833 (Shimmer3), DEV-834 (Shimmer3R)

  • Test/shimmer_test.c — print Firmware version: <FW_VERSION_STRING> as the first line after TEST START, so a captured report records exactly which build tested the unit. Prints on every report variant.
  • scripts/increment_version.sh — the generated version.h now declares fw_version_struct extern instead of defining it (static) in the header. Each firmware defines the single instance in its main.c. This stops the .version-section object being duplicated across every translation unit that includes version.h (it is pulled in very widely via shimmer_definitions.h).

Coordination

This is the shared change. The two firmware repos bump their log-and-stream-common submodule to this branch and add the single fw_version_struct definition:

  • Shimmer3RShimmerResearch/shimmer3r-firmware, DEV-834 (verified on STM32)
  • Shimmer3ShimmerResearch/shimmer3-firmware, DEV-833 (MSP430 — not built in this environment)

Merge this PR first, then re-point the firmware submodules to the merged commit.

Verification

Verified via the Shimmer3R STM32 build (GNU Tools for STM32 14.3): builds clean, .version embedded with a single fw_version_struct, and Firmware version: v1.01.005 present in the image.

🤖 Generated with Claude Code

marknolan and others added 2 commits July 2, 2026 10:15
…ersion.h include-safe

Add the firmware version (compile-time FW_VERSION_STRING) as the first line of the
factory test report, right after TEST START, so a captured report records exactly
which build tested the unit. Shared by every firmware that uses this common report
code (Shimmer3, Shimmer3R).

Move the fw_version_struct definition out of the generated version.h: the generator
now emits an extern declaration and each firmware defines the single instance in its
main.c. This stops the .version-section object being duplicated across every
translation unit that includes version.h (it is pulled in widely via
shimmer_definitions.h).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds firmware version visibility to factory test logs and adjusts the generated version.h to avoid multiple-definition issues when included across many translation units.

Changes:

  • Print Firmware version: <FW_VERSION_STRING> immediately after TEST START in the factory test report.
  • Update the version.h generator to declare fw_version_struct as extern (moving the single definition to firmware main.c).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Test/shimmer_test.c Emits the compile-time firmware version string into every factory test report.
scripts/increment_version.sh Changes generated version.h to avoid defining .version data in every translation unit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/increment_version.sh
@marknolan
marknolan merged commit 44b5384 into main Jul 2, 2026
1 check passed
@marknolan
marknolan deleted the DEV-833-834_fw_version_in_factory_test_report branch July 2, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants