#!/usr/bin/perl -w

while (<>) {
	print $_;
	print "#include \"main2.h\";\n" if m/USER CODE BEGIN Includes/;
	print "  my_setup_1();\n" if m/USER CODE BEGIN 1/;
	print "  my_setup_2();\n" if m/USER CODE BEGIN 2/;
	print "    my_loop();\n" if m/USER CODE BEGIN 3/;
	print "  my_errorHandler();\n" if m/USER CODE BEGIN Error_Handler/;
}




