I found a strange phenomenon with sdk 8.1.
If I use arm gcc compiler to compile code containing pstorage operation, functions like pstorage_clear will not return though the call back function is still called.
Finally, I found if the optimize option is changed from -o3 to -o1, pstorage_clear will work well.
But the Keil compiler works well even with option -o3 for the same code.
So it might be caused by the difference between the optimize option (like -o2) of the two compilers? But I don't know what exacactly is.
BTW, Keil uses --c99 and gcc uses --std=gnu99.