Abstract. Measurements of the low masses for the pulsar PSR J0737-3039B, for the companion of PSR J1756-2251 and for the companion of PSR J0453+1559 on the one hand and of the high masses for the pulsars PSR J1614-2230 and PSR J0348-0432 on the other demonstrate the existence of compact stars with masses in a broad range from 1.2 to 2 M . The most massive of these objects might be hybrid stars. To fulfill the constraint Mmax > 2 M with a reserve we exploit the stiff DD2 hadronic equation of state (EoS) without and with excluded volume (DD2vex) correction, which produce maximum neutron star masses of Mmax = 2.43 M and 2.70 M , respectively. We show that the stiffness of the EoS does not preclude an explanation of the whole set of cooling data within "nuclear medium cooling" scenario for compact stars by a variation of the star masses. We select appropriate proton gap profiles from those exploited in the literature and allow for a variation of the effective pion gap controlling the efficiency of the medium modified Urca process. However, we suppress the possibility of pion condensation. In general, the stiffer the EoS the steeper a decrease with density of the effective pion gap is required. Results are compared with previously obtained ones for the HDD EoS for which Mmax = 2.06 M . The cooling of the compact star in the supernova remnant Cassiopeia A (Cas A) is explained mainly by an efficient medium modified Urca process. To explain a > ∼ 2.5% decline of the cooling curve for Cas A, as motivated by an analysis of the ACIS-S instrument data, together with other cooling data exploiting the DD2 EoS a large proton gap at densities n < ∼ 2n0 is required vanishing for n > ∼ 2.5 n0, where n0 is the saturation nuclear density. A smaller decline, as it follows from an analysis of the HRC-S instrument data, is explained with many choices of parameters. With the DD2vex EoS and using an effective pion gap steeper decreasing with the density and/or a proton gap shifted to smaller densities we are also able to reproduce both a strong decline compatible with ACIS-S data and HRC-S instrument data. The mass of Cas A is estimated as 1.6 − 1.9 M , above the value 1.5 M , which we have evaluated with the softer HDD equation of state. Different mass choices for the hottest object XMMU J173203.3-344518 are discussed. We make general remarks also on hybrid star cooling and on its dependence on the stiffness of the hadronic EoS.PACS. 97.60.Jd Neutron stars -95.30.Cq Elementary particle processes -26.60-c Nuclear matter aspects of neutron stars