I'm trying to remember a movie or TV show that I saw as a kid. I think it was in the `80s but could have been later.
I don't remember the beginning but a guy had crashed on a planet after a battle. One of the enemy ships he was fighting was also shot down. I believe they had mother ships that had moved out of the system so no one was searching for either.
The planet was mostly rocky with mountains, no life, but of course oxygen. The guy finds the enemy wreckage which has robot pilots. He puts one of the robots back together using parts from the others in a cave he's living in.
He turns the robot on for the first time and the robot goes into kill all the humans mode so the guy turns him off. After a few ON/OFF cycles and showing the robot that he put it back together with parts from the others, they come to a truce while figuring out how to get back to their mother ships. Of course, they work together and eventually become friends.
I don't remember then ending but don't think they got rescued - I think it was a sad ending. I don't think there were any other characters but there may have been a narrator. It seemed to be a fairly big budget show with decent special effects for the time.
I think the robots were silver-colored with black joints. I don't think it was a movie - it might have been a newer Twilight Zone or other single story shows like Amazing Stories.
I've searched for various permutations of "guy robot trapped on planet" but didn't see anything that looked correct.