DEV-833/DEV-834 Print firmware version in factory test report; include-safe version.h - #110
Merged
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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 afterTEST STARTin the factory test report. - Update the
version.hgenerator to declarefw_version_structasextern(moving the single definition to firmwaremain.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the firmware version to the factory test report (shared by Shimmer3 and Shimmer3R) and makes the generated
version.hinclude-safe. This is the shared counterpart of DEV-832 (Verisense).Jira: DEV-833 (Shimmer3), DEV-834 (Shimmer3R)
Test/shimmer_test.c— printFirmware version: <FW_VERSION_STRING>as the first line afterTEST START, so a captured report records exactly which build tested the unit. Prints on every report variant.scripts/increment_version.sh— the generatedversion.hnow declaresfw_version_structexterninstead of defining it (static) in the header. Each firmware defines the single instance in itsmain.c. This stops the.version-section object being duplicated across every translation unit that includesversion.h(it is pulled in very widely viashimmer_definitions.h).Coordination
This is the shared change. The two firmware repos bump their
log-and-stream-commonsubmodule to this branch and add the singlefw_version_structdefinition:ShimmerResearch/shimmer3r-firmware, DEV-834 (verified on STM32)ShimmerResearch/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,
.versionembedded with a singlefw_version_struct, andFirmware version: v1.01.005present in the image.🤖 Generated with Claude Code