New board on marlin 2.0

i am trying to add a new board in marlin (ATmega2560) but i can’t seem to even compile it. i start clean from bugfix-2.0.x branch and then i do exactly what the documentation says:

“Once your pins file is ready, simply add a new define to the boards.h file and a conditional include to pins.h . And you’re done!”

the error i get is : #error “Unknown MOTHERBOARD value set in Configuration.h”

Of course the clean version compiles fine.
Do i have to add my board in some other background files too?

thank you