We are using Code Warrior for the Kinetis K50 family.
Our code is mixed C++ and C.
I am getting an illegal instruction trap.
The compiler generates:
to call an int-to-float conversion.
The linker converts it to:
which is, indeed, illegal on the K50 (ARM Cortex-M4).
Web searches have proved fruitless. It is probably a library issue somewhere, but I have no idea how to fix it.
Eliminating the floating-point operations completely is the last resort, and I have at this time no way to be certain that the problem won't show up somewhere else.