You say the first pic is after a G28, yet the X carriage is no where near the X endstop.
Does the X and Y stop at the endstop switches when you send a G28 ?
What are your home position values for X and Y in firmware? from the pics it looks like you might need a negative value,distance from nozzle to bed edge when X and Y are homed .