user81056: After a clean IDE install, the programmer submenu already has a default option selected as shown below:

I am working on creating a core package and would like a default programmer to be selected after choosing a board, though I'm not sure which file sets the default. For example, here is a different 3rd party package that does not select a default programmer when a board is chosen.


user37622: The default preferences.txt file in IDE installation has this setting. It is not read from the boards package configuration files.
The programmer key in preferences.txt contains the last selected programmer. The default preferences.txt in lib folder in IDE installation  has programmer = arduino:avrispmkii. It is used if preferences.txt in Arduino15 folder doesn't exist or doesn't have the specific key.
With the recent change in Arduino IDE only programmers from boards package of the selected board are displayed, so it happens that no programmer is selected.

81056: <p>After a clean IDE install, the programmer submenu already has a default option selected as shown below:
<a href="https://i.stack.imgur.com/9VoVN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9VoVN.png" alt="post of default selection" /></a></p>
<p>I am working on creating a core package and would like a default programmer to be selected after choosing a board, though I'm not sure which file sets the default. For example, here is a different 3rd party package that does <em>not</em> select a default programmer when a board is chosen.</p>
<p><a href="https://i.stack.imgur.com/ow90G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ow90G.png" alt="enter image description here" /></a></p>
 37622: <p>The default preferences.txt file in IDE installation has this setting. It is not read from the boards package configuration files.</p>
<p>The <code>programmer</code> key in preferences.txt contains the last selected programmer. The default preferences.txt in lib folder in IDE installation  has <code>programmer = arduino:avrispmkii</code>. It is used if preferences.txt in Arduino15 folder doesn't exist or doesn't have the specific key.</p>
<p>With the recent change in Arduino IDE only programmers from boards package of the selected board are displayed, so it happens that no programmer is selected.</p>
