Spray Madeleine molds with nonstick cooking spray.
Beat butter, sugar and egg on medium speed of electric mixer until light and creamy. Add buttermilk; mix well. (Mixture will look curdled).
Combine flour, cornmeal, baking powder, baking soda, salt and pepper. Add to creamed mixture on low speed, mixing until smooth. Stir in grated cheese, garlic and rosemary. Spoon batter into prepared molds, filling about three-quarter full.
Bake in centre of preheated oven for 7 to 9 minutes or until firm on top. Remove from molds and cool completely on wire rack.
These tend to dry out quickly so it’s best to eat them within 24 hours of baking - which typically isn’t a problem in our cheese loving house!