G2 core firmware for Arduino Mega

Is there a way I can use the G2 core firmware which was developed for arduino Due to be used in Arduino Mega? To run a 6 Axis machine?