First, make sure BOOT0 is low.

Look at pages 50 and 53 of the datasheet. Pins 34 and 37 are primary for A13 and A14. SWDIO and SWCLK are alternate functions. I would expect them to be enabled until you choose A13 and A14 GPIO, but it looks like you have to enable them yourself. Page 53 shows.that you want AF0 for both.
I had the other problem. I accidentally turned off SWDIO and SWCLK on stm32f030 during the GPIO init.
