File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -393,6 +393,19 @@ dap_version_s dap_adaptor_version(const dap_info_e version_kind)
393393 /* If that failed, return just the major */
394394 if (!end )
395395 return version ;
396+
397+ /* Special-case the MCU-Link firmware to correct some version numbering mistakes they've made */
398+ if (strncmp (bmda_probe_info .product , "MCU-Link" , 8U ) == 0 ) {
399+ /* If this is a v1.10+ MCU-Link */
400+ if (minor > 9U ) {
401+ /* Then unpack the version number - CMSIS-DAP v1.1.0 is (wrongly) encoded as v1.10 on these adaptors */
402+ version .minor = minor / 10U ;
403+ version .revision = minor % 10U ;
404+ /* Now return early as we're now done */
405+ return version ;
406+ }
407+ }
408+
396409 version .minor = minor ;
397410 /* Check if it's worth trying to convert anything more */
398411 if ((size_t )(end - version_str ) >= version_length || end [0 ] != '.' )
You can’t perform that action at this time.
0 commit comments