The individual, identified as Raouf El Ayeb, aged 29, was charged by an examining magistrate at a local hospital, where he is being treated after being injured in the attack, prosecutor Alex Perrin told AFP.
The magistrate has requested that Ayeb remain in custody, Perrin said.
The incident took place on Friday with the country was on high alert after the jihadist attacks in Paris on November 13 that claimed 130 lives and left 350 injured.
Witnesses said the driver deliberately accelerated his car, a Peugeot station wagon, as he headed towards four soldiers in a car park outside a large mosque.
The driver bore down on the team a first time, prompting them to shout a warning, and when he made another approach, they opened fire, seriously injuring him in the arm and the leg.
One of the soldiers sustained leg injuries after being hit by the vehicle, and a 72-year-old worshipper was also hurt after being hit in the leg by a stray bullet.
On Saturday, Perrin said Ayeb told emergency responders he “wanted to be killed by soldiers and to kill soldiers… a way for him to appear like a martyr.”
But, in his meeting with the examining magistrate, Ayeb “stepped back” from this statement, saying he only wanted to “run over” the soldiers, Perrin said on Sunday.
Investigators also found “jihadist propaganda images” on a computer at the man's home, and the assailant reportedly said the words “Allah is great” during the attack, Perrin said in Saturday's press conference.
But, he added, motivation for the attack remained unclear and there was no indication the suspect was a member of any terror organisation.