when I compile my stm32 code, there are some questions that undefined reference to some
functions.
Verbose mode can be enabled via
-v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 (14.1.0) > STM32F103VE (64k RAM. 512k Flash)
HARDWARE: STM32F103VET6 72MHz, 64KB RAM, 512KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-cmsis 2.50501.200527 (5.5.1)
- framework-cmsis-stm32f1 4.3.1
- tool-ldscripts-ststm32 0.1.0
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 1 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Compiling .pio/build/genericSTM32F103VE/FrameworkCMSIS/gcc/startup_stm32f103xe.o
Compiling .pio/build/genericSTM32F103VE/FrameworkCMSIS/system_stm32f1xx.o
Compiling .pio/build/genericSTM32F103VE/src/main.o
Compiling .pio/build/genericSTM32F103VE/src/stm32f10x_it.o
Linking .pio/build/genericSTM32F103VE/firmware.elf
.pio/build/genericSTM32F103VE/src/main.o: In functionLED_GPIO_Config': main.c:(.text.LED_GPIO_Config+0x6): undefined reference to
RCC_APB2PeriphClockCmd’
main.c:(.text.LED_GPIO_Config+0x26): undefined reference toGPIO_Init' main.c:(.text.LED_GPIO_Config+0x32): undefined reference to
GPIO_Init’
main.c:(.text.LED_GPIO_Config+0x3e): undefined reference toGPIO_Init' main.c:(.text.LED_GPIO_Config+0x46): undefined reference to
GPIO_SetBits’
main.c:(.text.LED_GPIO_Config+0x4e): undefined reference toGPIO_SetBits' main.c:(.text.LED_GPIO_Config+0x56): undefined reference to
GPIO_SetBits’
collect2: error: ld returned 1 exit status
*** [.pio/build/genericSTM32F103VE/firmware.elf] Error 1
This is my platformio.ini
I design header and library file like following picture
How can I solve this error?