This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using float with sprintf generates hardware fault

nRF51 SDK_v5.2.0.39364 GNU Compiler version 4.7 2013q1 Eclipse Juno SR2 nRF51822 Development Kit

uint8_t str[128]; //Declared globally

float tempval; tempval = measure_temperature(); memset(&str[0], 0, 128); sprintf((char*)&str[0], "%3.2f", tempval); <<- Hardware Fault here

I have attached the snapshot of the callstack. All source files compiled with "-mfloat-abi=soft" and linked with "-u _printf_float"

Can someone please help?

Best regards, Karthik

Capture.PNG

Parents Reply Children
No Data
Related