"Esperance" rock on Mars formed by erosion or weathering? or is there any rock on Mars not formed by erosion? I was wondering if the "Esperance" rock that was found on Mars by the Opportunity rover was formed due erosion or weathering? I have been reading a lot online but I did not seem to find anything. Does anyone know a type of rock on Mars that was not formed by erosion?
Rocks on Mars, just like rocks on Earth, can be igneous (formed from the cooling magma or lava) Sedimentary (formed from sediments that were laid down by water or wind) or Metamorphic (sedimentary rocks that have been changed by exposure to heat and pressure) (there may be other categories, such as meteorites)

After they have formed, rocks are subject to erosion and weathering. These processes don't form the rock, but can shape it or move it. The process of weathering produces sand, silt and clay, that can later form new rocks.

The Esperance rock has a significant amount of "clay" (a sedimentary rock). The clay in Esperance was formed by the weathering of other rocks to very fine particles, these then gathered together in wet environment to form a clay. When the water evaporated, the clay hardened into a rock. The significance of Esperance is that the water under which it formed must have been chemically neutral, not strongly acidic.