In a wide, heavy-bottomed pan over medium-low heat, heat olive oil until shimmering. Add onions and stir to coat with the oil. Cook, stirring occasionally, for about 5 to 10 minutes. Add sugar and salt. Continue to cook, stirring occasionally, for about 15 to 20 minutes or until softened and of deep brown color. Allow to completely cool.