Solved
creating a static library cannot select "Embedded C Library" only choose "Empty Project" wheng using STM32CubeIDE ,but TrueSTUDIO can.
TrueSTUDIO
STM32CubeIDE

TrueSTUDIO
STM32CubeIDE

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.