STM32F103 - TIM5 doesn't exist on medium density devices ? How do I tell what else is missing?
It doesn't seem to be spelled out very well, but you can look at the STM32F103x8/STM32F103xB datasheet:

Page 11 contains a diagram showing the peripherals available.

Section 2.3.15 Timers and watchdogs shows the timers available.

You will need to consult either the diagram on page 11 or the section specific to the type of peripheral you are looking at.

TIM5 and TIM8 are not available on your device.

Timers available are TIM1, TIM2, TIM3 and TIM4.