I've created a custom board in boards.txt
and changed the upload.tool
to a nonsense value, and yet when I do an upload the IDE still calls avrdude
.
For example, In boards.txt I've changed the line...
tile.upload.tool=avrdude
...to...
tile.upload.tool=nogood
...and added these lines to platform.txt...
# NOGOOD programmer
tools.nogood.cmd="dir"
tools.nogood.program.pattern="dir"
tools.nogood.upload.pattern="dir"
...and reloaded the IDE and hit upload.. and it still runs AVRDUDE.
(Note that my board ID is tile
)
I've verified that I am editing the correct boards.txt by changing the cores
key to nogood
and this does generate an error.
Is boardid.upload.tool
not the right place to change the recipe called when upload is hit?
How/where does the boardid.upload.tool=toolname
key in boards.txt get mapped to the tools.toolname.upload.pattern
key in platforms.txt?
I am using Arduino IDE version 1.8.3.
The custom boards.txt is in the directory Arduino\hardware\Move38\avr
.
This full custom platform package is here...
https://github.com/bigjosh/Move38-Arduino-Platform
Thanks!
3 Answers 3
From https://github.com/bigjosh/Move38-Arduino-Platform#programmers:
Since there is no bootloader in a tile, all code must be programmed rather than downloaded.
When you do an "Upload Using Programmer", the tool is specified in the {programmerID}.program.tool
property in programmers.txt. The {boardID}.upload.tool
value is only used for a standard upload.
Since programmers.txt is not in your hardware package, this makes it very inconvenient to customize. What's worse is that the platform.txt associated with the selected programmer is used, rather than the one in your hardware package, for "Upload Using Programmer". For this reason, some popular hardware packages include their own copies of all standard programmers. The downside of this is it really clutters up the Tools> Programmer menu if you have multiple of these packages installed.
-
Ugg. So ugly. Thanks for the authoritative answer - these are hard to come by in Arduino land! :)bigjosh– bigjosh2017年09月24日 03:52:28 +00:00Commented Sep 24, 2017 at 3:52
-
For future lookers, it does not seem like the
{boardID}.upload.tool
inplatform.txt
is always used for a standard upload. For example, it does not seem to be used if anupload.speed
is not specified inboards.txt
(even if the specified tool does not have a baudrate). It also does not seem to be used on OSX sometimes.bigjosh– bigjosh2018年11月11日 17:19:26 +00:00Commented Nov 11, 2018 at 17:19
Custom tools for the Arduino build process are documented in the Boards Manager Package Index spec here...
So it would seem that it i not possible to use custom tools with a manually installed board since there is no package index file.
-
This problem does not appear to be limited to only custom tools, it also seems to happen with built in tools like
avrdude
. :/bigjosh– bigjosh2018年11月11日 17:20:24 +00:00Commented Nov 11, 2018 at 17:20
If you leave the protocol
unset in the boards.txt
, then the current version of the Ardunio IDE (1.8.12) will then use the program
recipe rather than the upload
recipe in platform.txt
. The program
recipe can use the {protocol}
key to get the programmer selected in the IDE menus.
Relevant source in Arduino IDE SerialUploader.java
...
if (usingProgrammer || prefs.get("upload.protocol") == null) {
return uploadUsingProgrammer(buildPath, className);
}