microsoft / uf2

UF2 file format specification
Other
849 stars 164 forks source link

add support for multiple family IDs #52

Closed charkster closed 3 years ago

charkster commented 3 years ago

A dictionary containing family_id as the key and lowest address as the value was added to keep track of UF2 files with multiple families and multiple target addresses. The bin size in bytes was removed from the Header Information (as it was incorrect) and replaced with an indicator if any block flags were not identical. A UF2 file with multiple family IDs can output a bin file only if the -f option specifies a valid family ID. A UF2 with a single family ID does not need to specify a family when converting to a bin file (it can if it wants). Testing was done on UF2 files with 1, 2 and 3 family IDs. One known issue is that if a UF2 without the 0x2000 flag is concatenated, the script will crash (this behavior is consistent with present operation of the uf2conv.py script).

mmoskal commented 3 years ago

Thank you!