Cut the tomatoes in half and season the cut side with the salt.
Heat a large nonstick frying pan over very high heat. Sear the tomatoes in batches with the cut side down and cook until they begin to catch on the edges, approximately 2-3 minutes. After each batch, transfer them to a large roasting tin.
Slice the onion into 8 wedges.
Pour the olive oil into the hot pan, then fry the onions for 5-7 minutes to get them a nice golden colour and add them to the tomatoes.
Pour the balsamic vinegar over the tomatoes and add the thyme, then sprinkle over the pepper and brown sugar.
Cut the garlic heads in half widthways (so you are cutting the garlic cloves in half) and nestle them cut-side down into the roasting tin.
Roast in the hot oven for 45 minutes at 220°C or 450°F.
When cooked, remove the garlic (a spatula or fish slice really helps with this) and set it aside.
Carefully (it will be hot), squeeze all of the flesh from the garlic heads and add them to a blender with the roasted tomatoes.
Blend the soup until smooth and then pass it through a fine-mesh sieve. Depending on your tomatoes, you might need to add some stock, anywhere from none to 500ml or 2 cups should do.