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

TrueSTUDIO
STM32CubeIDE

It's in the flow for "New -> STM32 project" after you select target and press next you can select "Targeted Binary Type" and select "Static Library".
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.