AnsweredAssumed Answered

KDS V1.1 Cpu_INT_Hard_FaultInterrupt on atof() using MK22FN

Question asked by RANDY LEE on Aug 19, 2014
Latest reply on Sep 10, 2014 by Erich Styger

so I've ported a project off CW10.5 onto KDS V1.1 and got it to compile.  Debugging is another thing.

 

The following code is exploding on a hard fault interrupt:

 

double test = atof("1.2345");

 

if I do this:

double test = 54.321;

test = atof("12.345");

 

it explodes in the atof call inside something called _strtod_r()... test is showing actually as 54.321 (or close to it) indicating that there is some actual floating point going on.

 

When it explodes in this routine it appears to be on

 

vpush {d8}

 

I'm missing some sort of setting on this project now?  Is this library a bit wonky?  does this thing not understand floating point?  Is there some setting in the CPU that PE is missing that tells this it actually should use floating point hardware?

 

Target processor settings appear reasonable:

Outcomes