Hi all,
I use µVision 4.73 evaluation version. My target device is LPC4357 (cortex M4). All works fine, except when I use floating poit math.
volatile float F; #include <math.h> int main(void) { SystemInit(); F = 16.0; F = sqrt(F); }
above is only a snippet of the program. As soon I call the sqrt() I get a HardFault exception. The compiler uses microlib and no FPU is used. (defining F as double or calling sqrtf() same error).
When I enable the FPU, I get the same error before I reach main... stack- and heap size are both 0x4000.
Any idea ?
Thank you very much for response! I used the startup code that was delivered with this board www.embest-tech.com/.../edm1070ar-01.html (their example code). The SystemInit was called from main(). I changed the startupcode and call the SystemInit before jumping to main(), as the startupcode from keil.
All works fine now....
Thanks