Add a "built from modified design files" marker to firmware and software #457
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.
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 areyes
andno
. 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.