Envirement incopatible to the board

Hi,
A while ago I have started building a Pick and place machine based on the ramps 1.6 board, unfortunately my pinout was incompatible with Marlin Ramps pinout so I have declared new board for Marlin.
To do so I have added: new board to pins.h with a proper include for the pins file, as well as I have added a board to boards.h with unique number.

boards.h

#define BOARD_MYBOARD 1025

pins.h

#elif MB(MYBOARD)
#include “ramps/pins_MYBOARD.h”

In addition to be able to compile marlin in platformio I have added new env

[env:MYBOARD]
platform = atmelavr
board = megaatmega2560
build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_MYBOARD
lib_deps = ${common.lib_deps}
extra_scripts = ${common.extra_scripts}

Currently to match new recomentadions of OpenPNP I have tried to download marlin 2 bugfix branch and update it the same way but unfortunately while building I’m getting an error:

Build envirement ‘MYBOARD’ is incompatible with BOARD_MYBOARD.

Do you have any suggestions how to solve this error? I have seen few topics with similar errors but usually adding dedicated env solved a problem.

Better ask the Marlin developers for help on developing for Marlin. → Issues · MarlinFirmware/Marlin · GitHub

after some digging into it I have found out that there have to be spaces around ‘=’ in MOTHERBOARD = BOARD_MYBOARD, but it caused different error thhat was solved when this hole part was removed,
in a mean time I have updated Python on my Ubuntu so one of those finaly soled an issue.