In-situ synthesis on the substrate