Skip to content

Tools overridden via --prefs are persistent #11556

Open
@facchinm

Description

@facchinm

The bug gets exposed in a very particular configuration (and is usually harmless).

Steps to reproduce:
1 - Select a board with a board manager entry (MKRWIFI1010 for example)
2 - Compile a sketch
3 - Change board with one contained in the sketchbook (one from the mbed core with openocd as programmer)
4 - Select "upload using programmer"
5 - The wrong tool version will be selected

If steps 1 and 2 are not performed the right version gets selected.
If between step 2 and 3 the user opens the board manager the correct version gets selected too.

Caused by:
These lines

PreferencesData.getMap()
.subTree("runtime.build_properties_custom")
.entrySet()
.stream()
.forEach(kv -> cmd.add("-prefs=" + kv.getKey() + "=" + kv.getValue()));
allow overriding the automatically discovered tools, but should be cleared when we change the target board (and they are not)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions