diff options
author | Sergey Vlasov <sigprof@gmail.com> | 2021-06-07 08:42:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-06 22:42:08 -0700 |
commit | 680cc1fab4a9e1bc7a75a5a7fe063ae4717a86ae (patch) | |
tree | f909de106a763ecb5e326c957d45bb7d437fcc89 /show_options.mk | |
parent | 2e68897a620fec29772804dd2b1ba9268aec2188 (diff) |
Fix firmware size check with avr-libc 1:2.0.0+Atmel3.6.2-1.1 (Debian bullseye) (#12951)
Debian bullseye (testing at the moment, but seems close to release) has
avr-libc 1:2.0.0+Atmel3.6.2-1.1 with some changes taken from the
Atmel-distributed toolchain. In particular, the <avr/io.h> header for
ATmega32A (avr/iom32a.h) now defines the FLASHEND constant as `0x7FFFU`,
and that `U` suffix breaks the firmware size check code, because the
shell arithmetic expansion that is used to calculate `MAX_SIZE` does not
support those C-specific suffixes.
As a workaround, add `-D__ASSEMBLER__` to the C preprocessor invocation
that is used to expand those macros; in this case avr/iom32a.h defines
`FLASHEND` without the `U` suffix, and everything works as it did before
with older avr-libc versions.
The exact same code is present in two places; they are both changed,
even though the code in `tmk_core/avr.mk` is actually never used for
ATmega32A (and the header for ATmega32U4 does not add that `U` suffix to
`FLASHEND` for some reason).
Diffstat (limited to 'show_options.mk')
0 files changed, 0 insertions, 0 deletions