4809 board not recognised

Hello again,

I’m sticking with my atmega4809 board (I think, but things can change…). I’m reverting (is that the right word?) to programming it in the arduino framework. However, my project will be constructed using a chip and components. So I have gone back to a PIO.ini that worked for me with the atmega328 i.e. my arduino code compiled successfully. If I keep everything the same except for the line in PIO which describes the board and I change that to the line below:

board = ATmega4809

When I now compile the same code, I get this error:

Error: Unknown board ID ‘ATmega4809’

So I checked in the PIO home page and searched for the 4809 and it is listed.

Any help much appreciated
Paul

What’s the full platformio.ini? There needs to be at least a [env:environment_name] header and the platform = atmelavr line, otherwise PlatformIO doesn’t know what platform to search through. See ATmega4809 — PlatformIO latest documentation.

So as a baseline,

[env:ATmega4809]
platform = atmelmegaavr
board = ATmega4809

should be used for bare-metal projects, with the addition of framework = arduino for when you want to use the Arduino core instead of doing bare-metal programming.

If the error persists I’d suggest to update the PlatformIO core and all platforms. See e.g. here with the menu items “Platform Updates” and “Upgrade PlatformIO Core”.

thanks it was the line:

platform = atmelavr

which I changed to

platform = atmelmegaavr

and it now compiles.

Paul