开发者

newlib sscanf() throw hardfault exception in stm32

开发者 https://www.devze.com 2023-03-04 16:29 出处:网络
i use gcc compile my project, use the function sscanf() in main, the stack size is 4k, i debug the program in gdb, show VPUSH instruction throw the exception.

i use gcc compile my project, use the function sscanf() in main, the stack size is 4k, i debug the program in gdb, show VPUSH instruction throw the exception.

and i 开发者_如何学Ctest the function sprintf(), it work nice. why the function sscanf() is not work in newlib for stm32?


Apart from STM32 F4 series, those controllers do not support floating point instructions, vpush being one of them.

The problem should be solved by compiling newlib with -mfloat-abi=soft (and not softfp or hard).

0

精彩评论

暂无评论...
验证码 换一张
取 消