How to set up clock for the STM32 Nucleo-64 with libopencm3/rtos
You need to rewrite all of those functions as STM32F4 and STM32F1 have completely different clocks, different GPIOs . Changing GPIO pin is definitely not enough.+-