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

fix: Remove hardcoded FirmwareImageType in favor of a plain string #80

Closed
Nerivec opened this issue Oct 7, 2024 · 4 comments
Closed

Comments

@Nerivec
Copy link

Nerivec commented Oct 7, 2024

fw_type = FirmwareImageType(fw_type)

This line hard-fails if the in-file firmware type is anything other than the values in FirmwareImageType, preventing flashing of otherwise perfectly valid, and supported firmware.
Since that metadata is added by firmware builder manifest, it should not prevent the use of custom values, or even more "official" values that are not yet entered in the enum (forcing update of flasher).

@puddly
Copy link
Collaborator

puddly commented Oct 7, 2024

I'd like to keep the firmware types restricted to a set of well-known values (since there will be at most only a few). If you want to add internal information to describe a firmware variant, I think adding a new free-form field to the JSON like variant would be better.

NabuCasa/silabs-firmware-builder#82 will rename all of the firmware types to be more generic (e.g. zigbee_ncp) as opposed to just the SDK project name, which should simplify naming.

@Nerivec
Copy link
Author

Nerivec commented Oct 7, 2024

It prevents the use of other firmware types like the RCP blehci, even though the flasher should support it just fine out-of-the-box.

Also the error is very generic (ValueError: 'ncp-uart-sw' is not a valid FirmwareImageType) since it's derived from the above line, and let users wonder what exactly is behind it.

@puddly
Copy link
Collaborator

puddly commented Oct 7, 2024

Yeah, I'll definitely change it to a warning instead of an error. Just going forward, I think we should stick to a standard firmware type instead of tweaking it per firmware variant.

@puddly
Copy link
Collaborator

puddly commented Oct 16, 2024

Fixed by #81.

@puddly puddly closed this as completed Oct 16, 2024
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

No branches or pull requests

2 participants