STM32f103 SPI Problem

Hello Sorry i am working with blue Pill board with stm32f103c8 i have a problem with spi1, this board on SPI1 has two different configuration,one is PA4,PA5,PA6,PA7 and another one PB5,PB4,PB3,PA15 , I am working in framework = arduino . my device is working well on default pins PA4,PA5,PA6,PA7 whan i am working spi1 but i can not change pin configuration, i have already tried:
spi_config_gpios(SPI1,SPI_MODE0,GPIOA,38,GPIOB,39,40,41); this one but it do not change anything. does anyone has idea how can i solve this problem ?
thank a lot

What exact platformio.ini do you have? The bluepill board may use the Maple or the STM32 core, for which configuring SPI is different…

Thank you for your answer there is my configuration:
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = arduino
; change microcontroller
board_build.mcu = stm32f103c8t6

; change MCU frequency
board_build.f_cpu = 72000000L
upload_protocol = serial
monitor_speed=9600