Thermodynamics of martensitic transformations affected by hydrostatic pressure