Skip to content

chore(cpn): stop building STM32F2 simulators #6226

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pfeerick
Copy link
Member

@pfeerick pfeerick commented May 8, 2025

Summary of changes:

Following in the vein of #6225, rip out STM32F2 from Companion. This is a crude cull, simply making it so that radio profiles won't be listed, and that simulator plugins won't be generated. i.e. like with firmware, STM32F2 radio support may linger on until it finally gets broken, and can then be cleaned out.

note: not tested locally at all, so will probably break.

@pfeerick pfeerick added this to the 3.0 milestone May 8, 2025
@pfeerick pfeerick added companion Related to the companion software house keeping 🧹 Cleanup of code and house keeping labels May 8, 2025
@pfeerick pfeerick changed the title chore(cpn): stop building stm32f2 simulators chore(cpn): stop building STM32F2 simulators May 8, 2025
@3djc
Copy link
Collaborator

3djc commented May 8, 2025

Don't we need profiles to import F2 radio models to (hopefully) a newer radio ?

@pfeerick
Copy link
Member Author

pfeerick commented May 8, 2025

Possibly... but if you don't drop the profiles, you can't drop simulator library builds, without getting numerous runtime errors because the hwdef files aren't present for those targets. Thus companion doesn't get any of the benefits of dropping the stm32f2 builds. But this is a draft for a reason, as this needs to be considered further. ;) As it would be preferable to make it so you can do an import only of those radios, and then copy to another (newer) radio.

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented May 8, 2025

Possibly... but if you don't drop the profiles, you can't drop simulator library builds, without getting numerous runtime errors because the hwdef files aren't present for those targets. Thus companion doesn't get any of the benefits of dropping the stm32f2 builds. But this is a draft for a reason, as this needs to be considered further. ;) As it would be preferable to make it so you can do an import only of those radios, and then copy to another (newer) radio.

Maybe we should consider freezing the hwdef files so they do not require any build steps? @elecpower which files do we need exactly to achieve this?

@elecpower
Copy link
Collaborator

Companion uses the path and filter [build folder]/native/radio/src/*.json from which to load hwdefs into a resource file.

However I do not agree with retaining Companion support for unsupported firmware. Why? Quite simply the age old issue of potentially incompatible hwdef file formats. The files are not version stamped and even if they are then conversion code would need to be introduced and maintained until it can no longer be supported due to divergence. We just go rid of the onerous binary file support so I am not in favour of reintroducing that millstone.

@3djc
Copy link
Collaborator

3djc commented May 8, 2025

You raise good points

@raphaelcoeffic
Copy link
Member

However I do not agree with retaining Companion support for unsupported firmware.

I'm with you, no problem! That means you cannot convert from a radio that is not supported any more in 3.0 to one that is only supported from 3.0 on, right? Or did we kind-of ditch the conversion anyways? Or should we just try to import these files on a "best-effort" basis, telling the user that he will have to manually review all settings to check for potential errors?

@elecpower
Copy link
Collaborator

With no hwdef then no board thus Companion will parse the yaml and report unsupported radio and go no further.

Also the radio profiles point to a cpn firmware that points to a board.

It might be possible to use the Unknown board type and parse based on the current radio profile which is mostly what happens now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
companion Related to the companion software house keeping 🧹 Cleanup of code and house keeping
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants