Abstract A thermodynamic modeling on the chemical vapor deposition in the B-C-O-H, B-C-O-H-He and B-C-O-H-N systems was performed. The thermodynamic equilibrium in these systems was calculated by minimization of Gibbs free energy for the conditions: 300 ≤ Tdep, K ≤ 2000; 0.001 ≤ Ptotal, Torr ≤ 760; molar ratio of additional gas and precursor 0 ≤ R ≤ 10. The possibility of using trimethyl borate B(OCH3)3, as well as its mixtures with helium, hydrogen and ammonia, for obtaining films of various compositions is shown. The equilibrium conditions for the deposition of condensed phases in these systems were determined as a function of the deposition temperature, and reactant ratios. The results of calculations are presented as CVD phase diagrams. Predominant condensed phases at equilibrium were B2O3, B4C, BN, and graphite. It has been established that the addition of ammonia significantly changes the mechanism of the gas-phase deposition of films. The equations of chemical reactions determining the position of boundary lines are determined. It is shown that the chemical equilibria corresponding to these reactions can be used to control the CVD process.