The mechanisms of growth of silicon carbide (SiC) films by the method of substitution of atoms on macro- and mesoporous silicon substrates (Si) of p- and n-type conduction are investigated. Significant dependence of the rate and the mechanism of nucleation of SiC layers on Si on the type of Si doping and its crystallographic orientation is experimentally found. Comparison of the experimental data with the theoretical results obtained earlier is performed. It is shown that the presence of the system of pores on the surface allows one to significantly increase the thickness of silicon transformed into SiC during the process of synthesis by the method of substitution of atoms, which was equal to 115 microns in our experiments. The obtained samples are studied by methods of scanning electron microscopy, micro-Raman spectroscopy, and X-ray diffraction analysis. Numerical simulation of the distribution of elastic stresses caused by the difference in thermal expansion coefficients (TEC) in the heterostructures of GaN/SiC/porous Si/Si is conducted. It is revealed that the presence of pores in the near-surface layers of Si leads to considerable relaxation of elastic stresses in GaN films caused by differences in the TEC between GaN and Si.