[riot-commits] [RIOT-OS/RIOT] 60ee8c: cpu/atmega_common: Fix pm_reboot with LTO

benpicco noreply at github.com
Tue Feb 11 17:18:15 CET 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 60ee8cd513b86cee1ad521905b39a7cab0601d66
      https://github.com/RIOT-OS/RIOT/commit/60ee8cd513b86cee1ad521905b39a7cab0601d66
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

  Changed paths:
    M cpu/atmega_common/cpu.c

  Log Message:
  -----------
  cpu/atmega_common: Fix pm_reboot with LTO

The reboot process for ATmegas is to enable the watchdog timer and loop until
the wdt reboots this MCU. However, this reboot will keep the wdt configuration,
so that the wdt needs to be disabled during boot. This is done in get_mcusr,
but without the attribute "used" it will be optimized out in LTO builds. This
commits adds the attribute "used" to get_mcusr.

Also simplified the backward compatibility with older ATmegas (currently not
supported by RIOT) on outdated versions of avrlibc.


  Commit: de89f3a459ee654e7f0e53c116fca2946b1f4e2e
      https://github.com/RIOT-OS/RIOT/commit/de89f3a459ee654e7f0e53c116fca2946b1f4e2e
  Author: benpicco <benpicco at googlemail.com>
  Date:   2020-02-11 (Tue, 11 Feb 2020)

  Changed paths:
    M cpu/atmega_common/cpu.c

  Log Message:
  -----------
  Merge pull request #13319 from maribu/avr-reboot

cpu/atmega_common: Fix reboot issues


Compare: https://github.com/RIOT-OS/RIOT/compare/986ff50b75c6...de89f3a459ee


More information about the commits mailing list