Carbonate formation in Marslike environments