Fill a small bowl with water and put it into the freezer. In another small bowl, cut the butter into small pieces and put this bowl into the freezer as well.
In a medium bowl mix the flour, sugar and salt.
Remove the cut up butter from the freezer and add to the flour mixture. Using a pastry blender or a fork, mix until course, about the size of peas.
Remove the water from the freezer and add one tablespoon at a time until the dough starts to come together and stays formed when you pinch it.
Turn out the dough onto a lightly floured work surface and gently flatten, mix and form into a disk. Wrap the disk in plastic wrap and put it in the fridge for at least 2 hours.
Heat olive oil in a medium skillet. Add the onion and a good pinch of salt and saute on medium heat until dark golden brown. Add the garlic and saute for a 2 more minutes. Remove from heat.
Preheat the oven to 400 degrees F and line a pizza pan or large baking pan with parchment paper.
Dampen a work surface with water and lay a large piece of wax paper on top. Generously flour the wax paper and then roll out the dough into a 13" circle dusting with flour when it starts to stick to the rolling pin. Lightly flour the dough again and using the wax paper, fold the dough in half. Pick the dough up, place it on the baking pan (without the wax paper!) and sprinkle cornmeal on top leaving a 2" border.
Evenly spread caramelized onions on top of the cornmeal and 1 1/2 cups of grated cheese on top of the onions. Overlap and arrange the tomato slices in a circular pattern and sprinkle with fresh pepper.
Fold and pleat the edges of dough over the tomatoes, pressing any breaks together. Bake for 40 minutes, then remove and sprinkle the remaining grated cheese on top and bake for another 10 minutes.
Remove from the oven and transfer to a large cutting board or serving platter. Sprinkle with thinly sliced, fresh basil and let cool for 10 minutes before serving.
1. The dough can be made ahead of time and kept in the fridge until you are ready to make the galette.