[riot-notifications] [RIOT-OS/RIOT] makefiles/tools: Improved avrdude integration (#11039)

Marian Buschsieweke notifications at github.com
Wed Feb 20 22:19:05 CET 2019


### Contribution description

Currently it is impossible to use most ICSP programmers using RIOT's build system, e.g. using the `usbtiny` programmer to flash the `arduino-uno` will not work using

```
make BOARD=ardunio-uno PROGRAMMER=usbtiny
```

The reason is that the programmers serial port is set regardless of the programmer, but e.g. `usbtiny` does not use a serial port to interface with the PC. The first commit will only set the serial port for any of the default programmers of any AVR based board in RIOT (thus resulting in the same arguments for avrdude unless a custom value for `PROGRAMMER` is set). This allows using custom ICSP programmers.

The second commit sets the avrdude target based on the `$(CPU)` variable in the boards `Makefile.include`. Thus, the target no longer needs to be set for every AVR based board manually (and must no longer be set manually). The `Makefile.include` files for each board are updated accordingly.

### Testing procedure

Flashing for all AVR based boards should still work. (Instead of verifying all boards running `make BOARD=FOO flash-only` and verifying that the call to avrdude is still correct is just fine. Maybe it is good to still test for one or two boards on real hardware just to be sure.) Additionally, flashing with an ICSP (e.g. `usbtiny`) should now work.

***NOTE:*** The `jiminy-mega256rfr2` previously used `-p atmega256rfr2`, which does work. But according to the doc `-p m256rfr2` should be used. This PR changes the behavior to use `-p m256rfr2` instead.

### Issues/PRs references

None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11039

-- Commit Summary --

  * makefiles/tools: fix avrdude with ICSP programmers
  * makefiles/tools: Automatically set avrdude target

-- File Changes --

    M boards/arduino-duemilanove/Makefile.include (2)
    M boards/arduino-mega2560/Makefile.include (2)
    M boards/arduino-uno/Makefile.include (2)
    M boards/jiminy-mega256rfr2/Makefile.include (2)
    M boards/mega-xplained/Makefile.include (2)
    M boards/waspmote-pro/Makefile.include (2)
    M makefiles/tools/avrdude.inc.mk (14)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11039.patch
https://github.com/RIOT-OS/RIOT/pull/11039.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11039
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190220/f7233496/attachment.html>


More information about the notifications mailing list