It's quite complicated trying to build anything 'universal'.
How MicroPython does it is to generate a unique UF2 for each platform and variant so, considering Pico 1, Pico 1W, Pico 2 and forthcoming Pico 2W, there would be four separate UF2 files and you need to pick the right one.
At best they could be concatenated to produce two UF2 files, one for Pico 1 and 2, the other for Pico 1W and Pico 2W -For my port of MicroPython I build a single executable binary which adjusts itself to being a Pico or Pico W at runtime, and I expect to do the same for Pico 2 and 2W.
I foresee just two UF2 which can then be concatenated to a single UF2 which can be loaded to any of the four -Adding WIZnet Pico 1 W5500 and Pico 2 W5500 into the mix means having two extra UF2 files for MicroPython which cannot be concatenated with others. So at least four deliverable UF2 in total, six the way MicroPython have preferred it.
By making that also a run-time determination I would have no additional UF2 and still have a single universal UF2.
Having the code support the wireless, non-wireless and W5500 versions for each platform is considerably easier than trying to have an executable which has to adjust to being on different architectures at run-time.
How MicroPython does it is to generate a unique UF2 for each platform and variant so, considering Pico 1, Pico 1W, Pico 2 and forthcoming Pico 2W, there would be four separate UF2 files and you need to pick the right one.
At best they could be concatenated to produce two UF2 files, one for Pico 1 and 2, the other for Pico 1W and Pico 2W -
Code:
_______________ | | .-------------. .->| Pico 1 build |->| Pico 1 UF2 |--. | |_______________| `-------------' | .-------------. | _______________ }--->| Pico X UF2 | | | | .-------------. | `-------------' }->| Pico 1W build |->| Pico 1W UF2 |--|-. .--------. | |_______________| `-------------' | | | Source |--{ _______________ | | `--------' | | | .-------------. | | }->| Pico 2 build |->| Pico 2 UF2 |--' | | |_______________| `-------------' | .-------------. | _______________ }->| Pico XW UF2 | | | | .-------------. | `-------------' `->| Pico 2W build |->| Pico 2W UF2 |----' |_______________| `-------------'
I foresee just two UF2 which can then be concatenated to a single UF2 which can be loaded to any of the four -
Code:
_______________ | | .-----------------. .->| Pico 1 & 1W |->| Pico 1 & 1W UF2 |-. .--------. | |_______________| `-----------------' | .-----------------. | Source |--{ _______________ }->| Pico X & XW UF2 | `--------' | | | .-----------------. | `-----------------' `->| Pico 2 & 2W |->| Pico 2 & 2W UF2 |-' |_______________| `-----------------'
By making that also a run-time determination I would have no additional UF2 and still have a single universal UF2.
Having the code support the wireless, non-wireless and W5500 versions for each platform is considerably easier than trying to have an executable which has to adjust to being on different architectures at run-time.
Statistics: Posted by hippy — Sat Aug 31, 2024 3:07 am