[solved] Atmelavr outdated libraries

Hi, I’m using a board with ATmega328PB microcontroller. Because it is a low power design, I use the <avr/power.h> lib.
My platformio.ini file includes
platform = atmelavr
board = Atmega328pb
framework = arduino

board_build.mcu = atmega328pb
board_build.f_cpu = 8000000L

In the sketch I include
#include <avr.power.h>

When I compile, all references to functions out of the power-lib are not resolved! If I choose 328P, compiling is fine.
When I do the same with Arduino IDE ist works also with 328PB. After some research I found, that the libs in the avr toolchain of platformIO are outdated. So I copied the power.h file from Arduino IDE to platformIO avr- toolchain directory and now it works. The avr toolchain has to be at least arduino7 from year 2020, in which the problem with 328PB and maybe many other problems have been solved. Most of the lib files in avr-toolchain of platformIO are from 2018!! When can I expect an update of the avr-toolchain? Best regards wolfgang

PlatformIO does have the newer toolchain, it’s just not set as default.

Per Fastled clockless_trinket.h:326:24: error - #6 by maxgerhardt you can add

platform_packages =
  ; use GCC AVR 7.3.0+

to the platformio.ini and get the 7.3.0 toolchain instead of the 5.4.0 one.

thank’s a lot. I’s working fine now!!