Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent detect_targets.py tool script from crashing on known targets #6000
As mut['mcu'] can be "None" on unknown targets, the detect_targets script crashes when one of these boards is connected.
This happens when "mbed-cli detect -vv" is ran when a STEVAL-3DP001V1 board is connected. Which does not provide a html file with a target_id, and thus cannot be looked up in the mbedls platform database.
A few sentences describing the overall goals of the pull request's commits.
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
YES | NO
List related PRs against other branches:
Notes regarding the deployment of this PR. These should note any required changes in the build environment, tools, compilers and so on.
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.
@daid I'm not sure I like that solution, since my impression is that all mbed-enabled board should have some sort of html or info on the MSD interface used to identify it.
@c1728p9 I'm wondering if this is because the interface is STLINKV2. Is it possible that ST didn't include the files for this particular board in the firmware?
As a side note, looks like a fun board!
Indeed, there is only a txt file, not the htm file on this board, which includes an STLINKV2 on the board itself.
Else I would have contributed the proper id to the board database, but I don't think usb ids are proper stable identifiers for boards (I haven't look if this id changes between the 3 STEVAL-3DP001V1 boards we have)
I'm also not entirely sure if this is the correct fix, but this at least prevented the code from crashing, and list the board as incompatible with all default targets.
Just dropping by to say that our other STEVAL-3DP001V1 boards indeed have other identifiers, and thus adding it to the mbedls list is not an option.
The question here remains, should mbedls prevent giving None as ['mcu'] or should mbed-os be able to handle this None (as I did in this pull request)
Build number : 1147
Build number : 822