Closed canique closed 5 years ago
That's because the stock version of avr-gcc 5.4.0 doesn't support ATmega328PB. I'm using the compiler that's included in AVR boards v1.6.207. On my mac it's located in the following directory:
/Users/Hans/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-gcc
Great, thank you! I could compile it under Windows now by using the compiler in /Users/{username}/AppData/Local/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-gcc
Just for reference: Under linux I used this preferences file under /etc/apt/preferences.d/: Package: gcc-avr binutils-avr avr-libc libmpfr6 libstdc++6 libmpc3 Pin: release a=testing Pin-Priority: 950
Package: * Pin: release a=testing Pin-Priority: 99
and installed with this command
sudo apt-get install gcc-avr binutils-avr avr-libc libmpfr6 libmpc3
but this only gives you version 5.4.0-atmel3.6.0 so it's not the correct version.
Thanks for the info. I'll update the instructions as soon as gcc 5.4.x supports the new *PB series 👍
Should be fixed now. See https://github.com/MCUdude/optiboot_flash for details.
The documentation says: "You need to install make, avr-libc, avr-binutils and avr-gcc"
I have avr-libc (2.0.0) binutils-avr (2.26) gcc-avr (5.4.0)
When executing:
/usr/bin/avr-gcc -g -Wall -Os -fno-split-wide-types -mrelax -mmcu=atmega328pb -DF_CPU=16000000L -DBAUD_RATE=115200 -DLED_START_FLASHES=2 -DLED=B5 -DUART=0 -c -o optiboot_flash.o optiboot_flash.c
I get numerous errors... (see below) but when I select mmcu=atmega328p then the compilation works...