How can I access the name of my program?

There is control.getConfigValue API that you can use to probe the board the same way the runtime does. You can drop current.uf2 from your board on https://microsoft.github.io/uf2/patcher/ to see actual config of your board. You should be able to use control.getConfigValue(DAL.CFG_BOOATLOADER_BOARD_ID, 0), however some manufacturers just clone an existing config and you end up with multiple boards with the same ID. However you can query other things, for example control.getConfigValue(DAL.CFG_NUM_NEOPIXELS, 0). Feel free to wrap this up in an extension!

If you drop wrong UF2 it will be ignored, due to family-ID feature, see https://github.com/microsoft/uf2#family-id

1 Like