ARMmbed / ARMmbed/mbed-tools

Flash option should look for output based on CMake target name

Open
#282 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
49
Forks
32
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Currently, the flash option looks in the build directory for `foo.bin`, where `foo` is the name of the project folder. On the other hand, the compile command outputs `bar.bin`, where `bar` is the name of the CMake target. However, it is not uncommon for developers to want to use a CMake target name different to the project folder name. This is especially true in the case of repositories containing multiple examples that share a common folder structure. In such circumstances, the flash option will fail as `mbed-tools` will not be able to locate the output binary.

**Describe the solution you'd like**
Consider looking for the output binary based on the CMake target name. This way the flash option can never fail.

**Describe alternatives you've considered**
Output the binary based on the project folder name.

**Additional context**
None.

Contributor guide

Open the contributing guide

Research direction

Start by locating the flash option and the compile command's handling of the CMake target name, then reproduce a project whose folder and target names differ. Trace how the flash command selects the build output and verify that it finds the binary produced for the CMake target in a multi-example repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.