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
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