Skip to content

programmer.txt definitions must have priority over platforms.txt tools definitions #3017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2015

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Apr 22, 2015

This allows properties defined in programmers.txt to override the generic configurations in platform.txt where needed, for example in the following configuration:

programmers.txt:

myprog.name=My New Programmer
[...]
myprog.program.tool=avrdude
myprog.config.path={runtime.platform.path}/myprog_avrdude.conf
[...]

platform.txt:

[...]
tools.avrdude.path={runtime.tools.avrdude.path}
tools.avrdude.cmd.path={path}/bin/avrdude
tools.avrdude.config.path={path}/etc/avrdude.conf
[...]
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"

the generic tools.avrdude.config.path value {path}/etc/avrdude.conf is replaced by the more specific myprog.config.path used in "myprog" programmer {runtime.plaform.path}/myprog_avrdude.conf

This allows properties defined in programmers.txt to override generic
configurations in platform.txt where needed, for example in the
following configuration:

programmers.txt:

   myprog.name=My New Programmer
   [...]
   myprog.program.tool=avrdude
   myprog.config.path={runtime.platform.path}/myprog_avrdude.conf
   [...]

platform.txt:

   tools.avrdude.path={runtime.tools.avrdude.path}
   tools.avrdude.cmd.path={path}/bin/avrdude
   tools.avrdude.config.path={path}/etc/avrdude.conf
   [...]
   tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"

the generic tools.avrdude.config.path value

   {path}/etc/avrdude.conf

is replaced by the more specific myprog.config.path used in "myprog" programmer

   {runtime.plaform.path}/myprog_avrdude.conf
@cmaglie cmaglie added Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) Component: Uploading Uploading programs to an Arduino board labels May 6, 2015
ffissore added a commit that referenced this pull request May 6, 2015
programmer.txt definitions must have priority over platforms.txt tools definitions
@ffissore ffissore merged commit d0d9aa8 into arduino:master May 6, 2015
@cmaglie cmaglie deleted the programmer-pref-override branch May 6, 2015 13:53
@ffissore ffissore modified the milestone: Release 1.6.5 May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE Component: Uploading Uploading programs to an Arduino board feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants