Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "built from modified design files" marker to firmware and software #457

Merged
merged 5 commits into from
Oct 23, 2023

Conversation

whitequark
Copy link
Member

@whitequark whitequark commented Oct 21, 2023

In our documentation (in https://glasgow-embedded.org/latest/build.html) we very strongly require modified devices to not be described anywhere as "Glasgow Interface Explorer". Before this commit there is no way to avoid having that string appear in device descriptors. This commit adds a flag to the firmware, set once during factory flashing, indicating that this particular device was manufactured from modified device files.

This flag is a mandatory (to require positive confirmation) argument to glasgow factory called --using-modified-design-files, where the two valid choices are yes and no. When provided, the device enumerates as "Another Interface Explorer" instead (same word length as "Glasgow").

Adding this required chopping one byte off the "manufacturer" field in the EEPROM and repurposing it as a flags field. This is something we would have needed anyway in order to be able to extend the configuration block in the future. It was an oversight added in commit 63287e3.

(This is technically a breaking change, but one easy to detect since if anyone used that byte already, it would be ASCII, not 0x00 or 0x01, and in any case it's unlikely anyone did.)

The firmware now has more space because some really questionable sdcc codegen was factored out into usb_string_at_index().

Fixes #406.

…AM).

In our documentation (in https://glasgow-embedded.org/latest/build.html)
we very strongly require modified devices to not be described anywhere
as "Glasgow Interface Explorer". Before this commit there is no way to
avoid having that string appear in device descriptors. This commit adds
a flag to the firmware, set once during factory flashing, indicating
that this particular device was manufactured from modified device files.

This flag is a mandatory (to require positive confirmation) argument to
`glasgow factory` called `--using-modified-design-files`, where the two
valid choices are `yes` and `no`. When provided, the device enumerates
as "Another Interface Explorer" instead (same word length as "Glasgow").

Adding this required chopping one byte off the "manufacturer" field in
the EEPROM and repurposing it as a flags field. This is something we
would have needed anyway in order to be able to extend the configuration
block in the future. It was an oversight added in commit 63287e3.

(This is technically a breaking change, but one easy to detect since if
anyone used that byte already, it would be ASCII, not 0x00 or 0x01, and
in any case it's unlikely anyone did.)

The firmware now has *more* space because some really questionable sdcc
codegen was factored out into `usb_string_at_index()`.
Copy link
Member

@attie attie left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@attie attie added this pull request to the merge queue Oct 23, 2023
Merged via the queue into GlasgowEmbedded:main with commit 2b3da32 Oct 23, 2023
10 of 12 checks passed
@whitequark whitequark deleted the modified-design-flag branch October 23, 2023 22:38
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.

Add a flag to glasgow factory which indicates that the device has been modified from the original design
2 participants