This paper presents an automatic formal controller synthesis method for\nnonlinear sampled-data systems with safety and reachability specifications.\nFundamentally, the presented method is not restricted to polynomial systems and\ncontrollers. We consider periodically switched controllers based on a Control\nLyapunov Barrier-like functions. The proposed method utilizes genetic\nprogramming to synthesize these functions as well as the controller modes.\nCorrectness of the controller are subsequently verified by means of a\nSatisfiability Modulo Theories solver. Effectiveness of the proposed\nmethodology is demonstrated on multiple systems.\n