You can refer to here on how to build the legato image for mangoH Red board:
Please note that SW401 switch 3 needs to be “ON” on the mangOH_Red board in order to power up the Gyroscope/ Accelerometer.