Musk has been invited to Poland to establish his European headquarters in the town's historic 13th-century castle.