A narrow bandgap polymeric semiconductor, BOC-PTDPP, comprising alkyl substituted diketopyrrolopyrrole (DPP) and tert-butoxycarbonyl (t-BOC)-protected DPP, is synthesized and used in organic field-effect transistors (OFETs). The dominant polarity of charge carriers changes from positive to negative after the thermal cleavage of t-BOC groups at 200 °